| 1 | /* $Id: windowword.cpp,v 1.1 1999-09-15 23:19:03 sandervl Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * Win32 Get/SetWindowLong/Word user32 API functions for OS/2 | 
|---|
| 5 | * | 
|---|
| 6 | * Copyright 1998-1999 Sander van Leeuwen | 
|---|
| 7 | * | 
|---|
| 8 | * | 
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 10 | * | 
|---|
| 11 | */ | 
|---|
| 12 | #include <os2win.h> | 
|---|
| 13 | #include <misc.h> | 
|---|
| 14 |  | 
|---|
| 15 | #include <win32wbase.h> | 
|---|
| 16 |  | 
|---|
| 17 | //****************************************************************************** | 
|---|
| 18 | //****************************************************************************** | 
|---|
| 19 | LONG WIN32API SetWindowLongA(HWND hwnd, int nIndex, LONG  arg3) | 
|---|
| 20 | { | 
|---|
| 21 | Win32BaseWindow *window; | 
|---|
| 22 |  | 
|---|
| 23 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 24 | if(window) | 
|---|
| 25 | { | 
|---|
| 26 | return window->SetWindowLongA(nIndex, arg3); | 
|---|
| 27 | } | 
|---|
| 28 | else | 
|---|
| 29 | { | 
|---|
| 30 | dprintf(("SetWindowLongA; window %x not found!", hwnd)); | 
|---|
| 31 | } | 
|---|
| 32 | return 0; | 
|---|
| 33 | } | 
|---|
| 34 | //****************************************************************************** | 
|---|
| 35 | //****************************************************************************** | 
|---|
| 36 | LONG WIN32API SetWindowLongW(HWND hwnd, int nIndex, LONG  arg3) | 
|---|
| 37 | { | 
|---|
| 38 | Win32BaseWindow *window; | 
|---|
| 39 |  | 
|---|
| 40 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 41 | if(window) | 
|---|
| 42 | { | 
|---|
| 43 | return window->SetWindowLongA(nIndex, arg3); | 
|---|
| 44 | } | 
|---|
| 45 | else | 
|---|
| 46 | { | 
|---|
| 47 | dprintf(("SetWindowLongW; window %x not found!", hwnd)); | 
|---|
| 48 | } | 
|---|
| 49 | return 0; | 
|---|
| 50 | } | 
|---|
| 51 | //****************************************************************************** | 
|---|
| 52 | //****************************************************************************** | 
|---|
| 53 | WORD WIN32API GetWindowWord(HWND hwnd, int nIndex) | 
|---|
| 54 | { | 
|---|
| 55 | Win32BaseWindow *window; | 
|---|
| 56 |  | 
|---|
| 57 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 58 | if(window) | 
|---|
| 59 | { | 
|---|
| 60 | return window->GetWindowWord(nIndex); | 
|---|
| 61 | } | 
|---|
| 62 | else | 
|---|
| 63 | { | 
|---|
| 64 | dprintf(("GetWindowWord; window %x not found!", hwnd)); | 
|---|
| 65 | } | 
|---|
| 66 | return 0; | 
|---|
| 67 | } | 
|---|
| 68 | //****************************************************************************** | 
|---|
| 69 | //****************************************************************************** | 
|---|
| 70 | WORD WIN32API SetWindowWord(HWND hwnd, int nIndex, WORD arg3) | 
|---|
| 71 | { | 
|---|
| 72 | Win32BaseWindow *window; | 
|---|
| 73 |  | 
|---|
| 74 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 75 | if(window) | 
|---|
| 76 | { | 
|---|
| 77 | return window->SetWindowWord(nIndex, arg3); | 
|---|
| 78 | } | 
|---|
| 79 | else | 
|---|
| 80 | { | 
|---|
| 81 | dprintf(("SetWindowWord; window %x not found!", hwnd)); | 
|---|
| 82 | } | 
|---|
| 83 | return 0; | 
|---|
| 84 | } | 
|---|
| 85 | //****************************************************************************** | 
|---|
| 86 | //****************************************************************************** | 
|---|
| 87 | LONG WIN32API GetWindowLongA(HWND hwnd, int nIndex) | 
|---|
| 88 | { | 
|---|
| 89 | Win32BaseWindow *window; | 
|---|
| 90 |  | 
|---|
| 91 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 92 | if(window) | 
|---|
| 93 | { | 
|---|
| 94 | return window->GetWindowLongA(nIndex); | 
|---|
| 95 | } | 
|---|
| 96 | else | 
|---|
| 97 | { | 
|---|
| 98 | dprintf(("GetWindowLongA; window %x not found!", hwnd)); | 
|---|
| 99 | } | 
|---|
| 100 | return 0; | 
|---|
| 101 | } | 
|---|
| 102 | //****************************************************************************** | 
|---|
| 103 | //****************************************************************************** | 
|---|
| 104 | LONG WIN32API GetWindowLongW(HWND hwnd, int nIndex) | 
|---|
| 105 | { | 
|---|
| 106 | Win32BaseWindow *window; | 
|---|
| 107 |  | 
|---|
| 108 | window = Win32BaseWindow::GetWindowFromHandle(hwnd); | 
|---|
| 109 | if(window) | 
|---|
| 110 | { | 
|---|
| 111 | return window->GetWindowLongA(nIndex); | 
|---|
| 112 | } | 
|---|
| 113 | else | 
|---|
| 114 | { | 
|---|
| 115 | dprintf(("GetWindowLongW; window %x not found!", hwnd)); | 
|---|
| 116 | } | 
|---|
| 117 | return 0; | 
|---|
| 118 | } | 
|---|
| 119 | //****************************************************************************** | 
|---|
| 120 | //****************************************************************************** | 
|---|