- Timestamp:
- Jul 25, 1999, 5:51:57 PM (26 years ago)
- Location:
- trunk/src/user32/new
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/defwndproc.cpp
r391 r392 1 /* $Id: defwndproc.cpp,v 1. 3 1999-07-25 09:19:21sandervl Exp $ */1 /* $Id: defwndproc.cpp,v 1.4 1999-07-25 15:51:55 sandervl Exp $ */ 2 2 3 3 /* … … 12 12 #include "user32.h" 13 13 #include "syscolor.h" 14 #include "win32wnd.h" 14 15 15 16 #ifdef DEBUG … … 21 22 LRESULT WIN32API DefWindowProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 22 23 { 23 #ifdef DEBUG 24 //// WriteLog("DEFWNDPROC "); 25 //// WriteLog("*DWP*"); 26 #endif 27 switch(Msg) 28 { 29 case WM_SETREDRAW: //Open32 does not set the visible flag 30 if(wParam) 31 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 32 else SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 33 34 return 0; //TODO 35 36 case WM_NCCREATE: 37 return(TRUE); 38 39 case WM_CTLCOLORMSGBOX: 40 case WM_CTLCOLOREDIT: 41 case WM_CTLCOLORLISTBOX: 42 case WM_CTLCOLORBTN: 43 case WM_CTLCOLORDLG: 44 case WM_CTLCOLORSTATIC: 45 case WM_CTLCOLORSCROLLBAR: 46 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 47 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 48 return GetSysColorBrush(COLOR_BTNFACE); 49 50 case WM_PARENTNOTIFY: 51 return 0; 52 53 case WM_MOUSEACTIVATE: 54 { 55 DWORD dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 56 DWORD dwExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE); 57 dprintf(("DefWndProc: WM_MOUSEACTIVATE for %x Msg %s", hwnd, GetMsgText(HIWORD(lParam)))); 58 if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) ) 59 { 60 LRESULT rc = SendMessageA(GetParent(hwnd), WM_MOUSEACTIVATE, wParam, lParam ); 61 if(rc) return rc; 62 } 63 return (LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE; 64 } 65 case WM_SETCURSOR: 66 { 67 DWORD dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 68 DWORD dwExStyle = GetWindowLongA(hwnd, GWL_EXSTYLE); 69 dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", hwnd, GetMsgText(HIWORD(lParam)))); 70 if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) ) 71 { 72 LRESULT rc = SendMessageA(GetParent(hwnd), WM_SETCURSOR, wParam, lParam); 73 if(rc) return rc; 74 } 75 return 1; 76 } 77 case WM_MOUSEMOVE: 78 return 0; 79 80 case WM_ERASEBKGND: 81 case WM_ICONERASEBKGND: 82 return 0; 83 84 case WM_NCLBUTTONDOWN: 85 case WM_NCLBUTTONUP: 86 case WM_NCLBUTTONDBLCLK: 87 case WM_NCRBUTTONUP: 88 case WM_NCRBUTTONDOWN: 89 case WM_NCRBUTTONDBLCLK: 90 case WM_NCMBUTTONDOWN: 91 case WM_NCMBUTTONUP: 92 case WM_NCMBUTTONDBLCLK: 93 return 0; //TODO: Send WM_SYSCOMMAND if required 94 95 case WM_NCHITTEST: //TODO: 96 return 0; 97 98 default: 99 return 1; 24 Win32Window *window; 25 26 window = Win32Window::GetWindowFromHandle(hwnd); 27 if(!window) { 28 dprintf(("DefWindowProcA, window %x not found", hwnd)); 29 return 0; 30 } 31 return window->DefWindowProcA(Msg, wParam, lParam); 32 } 33 //****************************************************************************** 34 //****************************************************************************** 35 LRESULT WIN32API DefWindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 36 { 37 Win32Window *window; 38 39 window = Win32Window::GetWindowFromHandle(hwnd); 40 if(!window) { 41 dprintf(("DefWindowProcW, window %x not found", hwnd)); 42 return 0; 43 } 44 return window->DefWindowProcW(Msg, wParam, lParam); 45 } 46 //****************************************************************************** 47 //****************************************************************************** 48 LRESULT WIN32API DefDlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 49 { 50 #ifdef DEBUG 51 //// WriteLog("*DDP*"); 52 #endif 53 switch(Msg) { 54 case WM_SETREDRAW: //Open32 does not set the visible flag 55 if(wParam) 56 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 57 else 58 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 59 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 60 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 61 return(TRUE); 62 case WM_CTLCOLORMSGBOX: 63 case WM_CTLCOLOREDIT: 64 case WM_CTLCOLORLISTBOX: 65 case WM_CTLCOLORBTN: 66 case WM_CTLCOLORDLG: 67 case WM_CTLCOLORSTATIC: 68 case WM_CTLCOLORSCROLLBAR: 69 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 70 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 71 return GetSysColorBrush(COLOR_BTNFACE); 72 73 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 74 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 75 return 0; 76 77 default: 78 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 100 79 } 101 80 } … … 103 82 //NOTE: Unicode msg translation! 104 83 //****************************************************************************** 105 LRESULT WIN32API Def WindowProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)106 { 107 #ifdef DEBUG 108 //// WriteLog("*D WPW*");109 #endif 110 switch(Msg) { 111 case WM_SETREDRAW: //Open32 does not set the visible flag 112 if(wParam) 113 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 114 else 115 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 116 return O32_Def WindowProc(hwnd, Msg, wParam, lParam);117 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 118 return(TRUE); 119 case WM_CTLCOLORMSGBOX: 120 case WM_CTLCOLOREDIT: 121 case WM_CTLCOLORLISTBOX: 122 case WM_CTLCOLORBTN: 123 case WM_CTLCOLORDLG: 124 case WM_CTLCOLORSTATIC: 125 case WM_CTLCOLORSCROLLBAR: 126 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 127 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 128 return GetSysColorBrush(COLOR_BTNFACE); 129 130 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 131 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 132 return 0; 133 134 default: 135 return O32_Def WindowProc(hwnd, Msg, wParam, lParam);136 } 137 } 138 //****************************************************************************** 139 //****************************************************************************** 140 LRESULT WIN32API Def DlgProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)141 { 142 #ifdef DEBUG 143 //// WriteLog("*D DP*");144 #endif 145 switch(Msg) { 146 case WM_SETREDRAW: //Open32 does not set the visible flag 147 if(wParam) 148 SetWindowLongA (hwnd , GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);149 else 150 SetWindowLongA (hwnd , GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);151 return O32_Def DlgProc(hwnd, Msg, wParam, lParam);152 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 153 return(TRUE); 154 case WM_CTLCOLORMSGBOX: 155 case WM_CTLCOLOREDIT: 156 case WM_CTLCOLORLISTBOX: 157 case WM_CTLCOLORBTN: 158 case WM_CTLCOLORDLG: 159 case WM_CTLCOLORSTATIC: 160 case WM_CTLCOLORSCROLLBAR: 161 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 162 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 163 return GetSysColorBrush(COLOR_BTNFACE); 164 165 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 166 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd ));167 return 0; 168 169 default: 170 return O32_Def DlgProc(hwnd, Msg, wParam, lParam);84 LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 85 { 86 #ifdef DEBUG 87 //// WriteLog("*DDPW*"); 88 #endif 89 switch(Msg) { 90 case WM_SETREDRAW: //Open32 does not set the visible flag 91 if(wParam) 92 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 93 else 94 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 95 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 96 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 97 return(TRUE); 98 case WM_CTLCOLORMSGBOX: 99 case WM_CTLCOLOREDIT: 100 case WM_CTLCOLORLISTBOX: 101 case WM_CTLCOLORBTN: 102 case WM_CTLCOLORDLG: 103 case WM_CTLCOLORSTATIC: 104 case WM_CTLCOLORSCROLLBAR: 105 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 106 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 107 return GetSysColorBrush(COLOR_BTNFACE); 108 109 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 110 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 111 return 0; 112 113 default: 114 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 115 } 116 } 117 //****************************************************************************** 118 //****************************************************************************** 119 LRESULT WIN32API DefFrameProcA(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam) 120 { 121 #ifdef DEBUG 122 //// WriteLog("*DFP*"); 123 #endif 124 switch(Msg) { 125 case WM_SETREDRAW: //Open32 does not set the visible flag 126 if(wParam) 127 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE); 128 else 129 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE); 130 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam); 131 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 132 return(TRUE); 133 case WM_CTLCOLORMSGBOX: 134 case WM_CTLCOLOREDIT: 135 case WM_CTLCOLORLISTBOX: 136 case WM_CTLCOLORBTN: 137 case WM_CTLCOLORDLG: 138 case WM_CTLCOLORSTATIC: 139 case WM_CTLCOLORSCROLLBAR: 140 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 141 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 142 return GetSysColorBrush(COLOR_BTNFACE); 143 144 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 145 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwndFrame)); 146 return 0; 147 148 default: 149 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam); 171 150 } 172 151 } … … 174 153 //NOTE: Unicode msg translation! 175 154 //****************************************************************************** 176 LRESULT WIN32API DefDlgProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 177 { 178 #ifdef DEBUG 179 //// WriteLog("*DDPW*"); 180 #endif 181 switch(Msg) { 182 case WM_SETREDRAW: //Open32 does not set the visible flag 183 if(wParam) 184 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 185 else 186 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 187 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 188 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 189 return(TRUE); 190 case WM_CTLCOLORMSGBOX: 191 case WM_CTLCOLOREDIT: 192 case WM_CTLCOLORLISTBOX: 193 case WM_CTLCOLORBTN: 194 case WM_CTLCOLORDLG: 195 case WM_CTLCOLORSTATIC: 196 case WM_CTLCOLORSCROLLBAR: 197 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 198 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 199 return GetSysColorBrush(COLOR_BTNFACE); 200 201 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 202 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 203 return 0; 204 205 default: 206 return O32_DefDlgProc(hwnd, Msg, wParam, lParam); 207 } 208 } 209 //****************************************************************************** 210 //****************************************************************************** 211 LRESULT WIN32API DefFrameProcA(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam) 212 { 213 #ifdef DEBUG 214 //// WriteLog("*DFP*"); 155 LRESULT WIN32API DefFrameProcW(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam) 156 { 157 #ifdef DEBUG 158 //// WriteLog("*DFPW*"); 215 159 #endif 216 160 switch(Msg) { … … 243 187 } 244 188 //****************************************************************************** 189 //****************************************************************************** 190 LRESULT WIN32API DefMDIChildProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 191 { 192 #ifdef DEBUG 193 //// WriteLog("*DMP*"); 194 #endif 195 switch(Msg) { 196 case WM_SETREDRAW: //Open32 does not set the visible flag 197 if(wParam) 198 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE); 199 else 200 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE); 201 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 202 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing) 203 return(TRUE); 204 case WM_CTLCOLORMSGBOX: 205 case WM_CTLCOLOREDIT: 206 case WM_CTLCOLORLISTBOX: 207 case WM_CTLCOLORBTN: 208 case WM_CTLCOLORDLG: 209 case WM_CTLCOLORSTATIC: 210 case WM_CTLCOLORSCROLLBAR: 211 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 212 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 213 return GetSysColorBrush(COLOR_BTNFACE); 214 215 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!! 216 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd)); 217 return 0; 218 219 default: 220 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam); 221 } 222 } 223 //****************************************************************************** 245 224 //NOTE: Unicode msg translation! 246 225 //****************************************************************************** 247 LRESULT WIN32API DefFrameProcW(HWND hwndFrame, HWND hwndClient, UINT Msg, WPARAM wParam, LPARAM lParam)248 {249 #ifdef DEBUG250 //// WriteLog("*DFPW*");251 #endif252 switch(Msg) {253 case WM_SETREDRAW: //Open32 does not set the visible flag254 if(wParam)255 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) | WS_VISIBLE);256 else257 SetWindowLongA (hwndClient, GWL_STYLE, GetWindowLongA (hwndClient, GWL_STYLE) & ~WS_VISIBLE);258 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);259 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)260 return(TRUE);261 case WM_CTLCOLORMSGBOX:262 case WM_CTLCOLOREDIT:263 case WM_CTLCOLORLISTBOX:264 case WM_CTLCOLORBTN:265 case WM_CTLCOLORDLG:266 case WM_CTLCOLORSTATIC:267 case WM_CTLCOLORSCROLLBAR:268 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));269 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));270 return GetSysColorBrush(COLOR_BTNFACE);271 272 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!273 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwndFrame));274 return 0;275 276 default:277 return O32_DefFrameProc(hwndFrame, hwndClient, Msg, wParam, lParam);278 }279 }280 //******************************************************************************281 //******************************************************************************282 LRESULT WIN32API DefMDIChildProcA(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam)283 {284 #ifdef DEBUG285 //// WriteLog("*DMP*");286 #endif287 switch(Msg) {288 case WM_SETREDRAW: //Open32 does not set the visible flag289 if(wParam)290 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) | WS_VISIBLE);291 else292 SetWindowLongA (hwnd, GWL_STYLE, GetWindowLongA (hwnd, GWL_STYLE) & ~WS_VISIBLE);293 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);294 case WM_NCCREATE://SvL: YAOFM (yet another open32 feature missing)295 return(TRUE);296 case WM_CTLCOLORMSGBOX:297 case WM_CTLCOLOREDIT:298 case WM_CTLCOLORLISTBOX:299 case WM_CTLCOLORBTN:300 case WM_CTLCOLORDLG:301 case WM_CTLCOLORSTATIC:302 case WM_CTLCOLORSCROLLBAR:303 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));304 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));305 return GetSysColorBrush(COLOR_BTNFACE);306 307 case WM_PARENTNOTIFY: //Open32 doesn't like receiving those!!308 dprintf(("DefWndProc: WM_PARENTNOTIFY for %x", hwnd));309 return 0;310 311 default:312 return O32_DefMDIChildProc(hwnd, Msg, wParam, lParam);313 }314 }315 //******************************************************************************316 //NOTE: Unicode msg translation!317 //******************************************************************************318 226 LRESULT WIN32API DefMDIChildProcW(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) 319 227 { -
trunk/src/user32/new/makefile
r387 r392 1 # $Id: makefile,v 1. 19 1999-07-24 17:10:25 cbratschiExp $1 # $Id: makefile,v 1.20 1999-07-25 15:51:55 sandervl Exp $ 2 2 3 3 # … … 33 33 oslibutil.obj oslibmsg.obj windlg.obj \ 34 34 winprop.obj wingdi.obj oslibgdi.obj winaccel.obj winscrollbar.obj \ 35 nativerc.obj oslibres.obj 35 nativerc.obj oslibres.obj winnonclient.obj 36 36 37 37 … … 108 108 oslibres.obj: oslibres.cpp oslibwin.h oslibres.h 109 109 110 winnonclient.obj: winnonclient.cpp 111 110 112 clean: 111 113 $(RM) *.obj *.lib *.dll *~ *.map *.pch -
trunk/src/user32/new/oslibgdi.cpp
r389 r392 1 /* $Id: oslibgdi.cpp,v 1. 6 1999-07-25 08:19:05 sandervl Exp $ */1 /* $Id: oslibgdi.cpp,v 1.7 1999-07-25 15:51:55 sandervl Exp $ */ 2 2 /* 3 3 * Window GDI wrapper functions for OS/2 … … 159 159 HDC OSLibWinGetPS(HWND hwnd) 160 160 { 161 if(hwnd == OSLIB_HWND_DESKTOP) 162 hwnd = HWND_DESKTOP; 163 161 164 return (HDC)WinGetPS(hwnd); 162 165 } -
trunk/src/user32/new/pmwindow.cpp
r391 r392 1 /* $Id: pmwindow.cpp,v 1.1 4 1999-07-25 09:19:21sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.15 1999-07-25 15:51:56 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 473 473 keyflags |= KEY_PREVDOWN; 474 474 } 475 if(fl & KC_DEADKEY) { 476 keyflags |= KEY_DEADKEY; 477 } 475 478 if(win32wnd->MsgChar(SHORT1FROMMP(mp2), CHAR3FROMMP(mp1), CHAR4FROMMP(mp1), vkey, keyflags)) { 476 479 goto RunDefWndProc; … … 499 502 } 500 503 504 case WM_QUERYWINDOWPARAMS: 505 { 506 PWNDPARAMS wndpars = (PWNDPARAMS)mp1; 507 ULONG textlen; 508 PSZ wintext; 509 510 if(wndpars->fsStatus & (WPM_CCHTEXT | WPM_TEXT)) { 511 if(wndpars->fsStatus & WPM_CCHTEXT) 512 wndpars->cchText = win32wnd->MsgGetTextLength(); 513 if(wndpars->fsStatus & WPM_TEXT) 514 wndpars->pszText = win32wnd->MsgGetText(); 515 return (MRESULT)TRUE; 516 } 517 goto RunDefWndProc; 518 } 519 501 520 case WM_PAINT: 502 521 dprintf(("OS2: WM_PAINT %x", hwnd)); … … 515 534 case WM_SYSVALUECHANGED: 516 535 case WM_CALCVALIDRECTS: 517 case WM_QUERYWINDOWPARAMS:518 536 case WM_SETSELECTION: 519 537 case WM_PPAINT: -
trunk/src/user32/new/user32.cpp
r391 r392 1 /* $Id: user32.cpp,v 1.1 0 1999-07-25 09:19:21sandervl Exp $ */1 /* $Id: user32.cpp,v 1.11 1999-07-25 15:51:56 sandervl Exp $ */ 2 2 3 3 /* … … 258 258 { 259 259 // ddprintf(("USER32: CopyRect\n")); 260 if (!lprcDst || !lprcSrc) return FALSE; 260 if (!lprcDst || !lprcSrc) { 261 SetLastError(ERROR_INVALID_PARAMETER); 262 return FALSE; 263 } 261 264 262 265 memcpy(lprcDst,lprcSrc,sizeof(RECT)); -
trunk/src/user32/new/win32wnd.cpp
r391 r392 1 /* $Id: win32wnd.cpp,v 1.2 1 1999-07-25 09:19:22sandervl Exp $ */1 /* $Id: win32wnd.cpp,v 1.22 1999-07-25 15:51:56 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 31 31 #include <oslibres.h> 32 32 #include <winres.h> 33 #include "syscolor.h" 33 34 34 35 #define HAS_DLGFRAME(style,exStyle) \ … … 60 61 { 61 62 isUnicode = FALSE; 62 63 windowName = NULL; 63 fCreated = FALSE; 64 65 memset(windowNameA, 0, MAX_WINDOW_NAMELENGTH); 66 memset(windowNameW, 0, MAX_WINDOW_NAMELENGTH*sizeof(WCHAR)); 64 67 wndNameLength = 0; 65 66 windowText = NULL;;67 wndTextLength = 0;68 68 69 69 userWindowLong = NULL;; … … 115 115 if(Win32Hwnd) 116 116 HMHandleFree(Win32Hwnd & 0xFFFF); 117 if(windowName)118 free(windowName);119 if(windowText)120 free(windowText);121 117 if(userWindowLong) 122 118 free(userWindowLong); … … 248 244 if ((cs->style & WS_CHILD) && cs->hwndParent) 249 245 { 250 SetParent(cs->hwndParent);246 SetParent(cs->hwndParent); 251 247 } 252 248 else 253 249 { 254 250 if (!cs->hwndParent) { 255 251 owner = NULL; 256 252 } 257 253 else 258 254 { 259 owner = GetWindowFromHandle(cs->hwndParent);260 261 262 263 264 255 owner = GetWindowFromHandle(cs->hwndParent); 256 if(owner == NULL) 257 { 258 dprintf(("HMHandleTranslateToOS2 couldn't find owner window %x!!!", cs->hwndParent)); 259 return FALSE; 260 } 265 261 } 266 262 } … … 361 357 return FALSE; 362 358 } 359 363 360 if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) { 364 361 dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd)); … … 412 409 if( (SendInternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 ) 413 410 { 411 if(!(flags & WIN_NEED_SIZE)) { 412 SendMessageA(WM_SIZE, SIZE_RESTORED, 413 MAKELONG(rectClient.right-rectClient.left, 414 rectClient.bottom-rectClient.top)); 415 SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) ); 416 } 414 417 SetWindowPos(HWND_TOP, rectClient.left, rectClient.top, 415 418 rectClient.right-rectClient.left, 416 419 rectClient.bottom-rectClient.top, 417 420 SWP_NOACTIVATE); 418 419 421 if (cs->style & WS_VISIBLE) ShowWindow( sw ); 420 422 … … 425 427 HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 ); 426 428 #endif 429 fCreated = TRUE; 427 430 SetLastError(0); 428 431 return TRUE; … … 606 609 MinMax.ptMinTrackSize.y ); 607 610 608 if (maxSize) *maxSize= MinMax.ptMaxSize;609 if (maxPos) *maxPos= MinMax.ptMaxPosition;610 if (minTrack) *minTrack = MinMax.ptMinTrackSize;611 if (maxTrack) *maxTrack = MinMax.ptMaxTrackSize;611 if (maxSize) *maxSize = MinMax.ptMaxSize; 612 if (maxPos) *maxPos = MinMax.ptMaxPosition; 613 if (minTrack) *minTrack = MinMax.ptMinTrackSize; 614 if (maxTrack) *maxTrack = MinMax.ptMaxTrackSize; 612 615 } 613 616 /*********************************************************************** … … 619 622 * when calcValidRect is TRUE. 620 623 */ 621 LONG Win32Window::SendNCCalcSize(BOOL calcValidRect, 622 RECT *newWindowRect, RECT *oldWindowRect, 623 RECT *oldClientRect, WINDOWPOS *winpos, 624 RECT *newClientRect ) 624 LONG Win32Window::SendNCCalcSize(BOOL calcValidRect, RECT *newWindowRect, RECT *oldWindowRect, 625 RECT *oldClientRect, WINDOWPOS *winpos, 626 RECT *newClientRect ) 625 627 { 626 628 NCCALCSIZE_PARAMS params; … … 632 634 { 633 635 winposCopy = *winpos; 634 params.rgrc[1] = *oldWindowRect;635 params.rgrc[2] = *oldClientRect;636 params.lppos = &winposCopy;636 params.rgrc[1] = *oldWindowRect; 637 params.rgrc[2] = *oldClientRect; 638 params.lppos = &winposCopy; 637 639 } 638 640 result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect, … … 723 725 WORD fwSizeType = 0; 724 726 727 if(fCreated == FALSE) {//Solitaire crashes if it receives a WM_SIZE during CreateWindowEx (normal or our fault?) 728 return 1; 729 } 730 725 731 if(fMinimize) { 726 732 fwSizeType = SIZE_MINIMIZED; … … 747 753 } 748 754 //****************************************************************************** 749 //TODO: virtual key translation & extended keyboard bit755 //TODO: virtual key & (possibly) scancode translation, extended keyboard bit & Unicode 750 756 //****************************************************************************** 751 757 ULONG Win32Window::MsgChar(ULONG cmd, ULONG repeatcnt, ULONG scancode, ULONG vkey, ULONG keyflags) … … 761 767 if(keyflags & KEY_UP) 762 768 lParam |= (1<<31); 763 dprintf(("WM_CHAR: %x %x %08x", OS2Hwnd, cmd, lParam)); 764 return SendInternalMessageA(WM_CHAR, cmd, lParam); 769 if(keyflags & KEY_DEADKEY) { 770 dprintf(("WM_DEADCHAR: %x %x %08x", OS2Hwnd, cmd, lParam)); 771 return SendInternalMessageA(WM_DEADCHAR, cmd, lParam); 772 } 773 else { 774 dprintf(("WM_CHAR: %x %x %08x", OS2Hwnd, cmd, lParam)); 775 return SendInternalMessageA(WM_CHAR, cmd, lParam); 776 } 765 777 } 766 778 //****************************************************************************** … … 832 844 ULONG Win32Window::MsgMouseMove(ULONG keystate, ULONG x, ULONG y) 833 845 { 834 ULONG winstate = 0;835 836 if(keystate & WMMOVE_LBUTTON)837 winstate |= MK_LBUTTON;838 if(keystate & WMMOVE_RBUTTON)839 winstate |= MK_RBUTTON;840 if(keystate & WMMOVE_MBUTTON)841 winstate |= MK_MBUTTON;842 if(keystate & WMMOVE_SHIFT)843 winstate |= MK_SHIFT;844 if(keystate & WMMOVE_CTRL)845 winstate |= MK_CONTROL;846 847 return SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));846 ULONG winstate = 0; 847 848 if(keystate & WMMOVE_LBUTTON) 849 winstate |= MK_LBUTTON; 850 if(keystate & WMMOVE_RBUTTON) 851 winstate |= MK_RBUTTON; 852 if(keystate & WMMOVE_MBUTTON) 853 winstate |= MK_MBUTTON; 854 if(keystate & WMMOVE_SHIFT) 855 winstate |= MK_SHIFT; 856 if(keystate & WMMOVE_CTRL) 857 winstate |= MK_CONTROL; 858 859 return SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y)); 848 860 } 849 861 //****************************************************************************** … … 851 863 ULONG Win32Window::MsgPaint(ULONG tmp1, ULONG tmp2) 852 864 { 853 return SendInternalMessageA(WM_PAINT, 0, 0);865 return SendInternalMessageA(WM_PAINT, 0, 0); 854 866 } 855 867 //****************************************************************************** … … 866 878 ULONG Win32Window::MsgSetText(LPSTR lpsz, LONG cch) 867 879 { 868 if(isUnicode) { 869 return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz); 870 } 871 else return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz); 880 if(isUnicode) { 881 return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz); 882 } 883 else return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz); 884 } 885 //****************************************************************************** 886 //TODO: in- or excluding terminating 0? 887 //****************************************************************************** 888 ULONG Win32Window::MsgGetTextLength() 889 { 890 return SendInternalMessageA(WM_GETTEXTLENGTH, 0, 0); 891 } 892 //****************************************************************************** 893 //****************************************************************************** 894 char *Win32Window::MsgGetText() 895 { 896 if(isUnicode) { 897 SendInternalMessageW(WM_GETTEXT, MAX_WINDOW_NAMELENGTH, (LPARAM)windowNameW); 898 } 899 else { 900 SendInternalMessageA(WM_GETTEXT, MAX_WINDOW_NAMELENGTH, (LPARAM)windowNameA); 901 } 902 return windowNameA; 903 } 904 //****************************************************************************** 905 //****************************************************************************** 906 LRESULT Win32Window::DefWindowProcA(UINT Msg, WPARAM wParam, LPARAM lParam) 907 { 908 switch(Msg) 909 { 910 case WM_GETTEXTLENGTH: 911 return wndNameLength; 912 913 case WM_GETTEXT: //TODO: SS_ICON controls 914 strncpy((LPSTR)lParam, windowNameA, wParam); 915 return min(wndNameLength, wParam); 916 917 case WM_SETTEXT: 918 return 0; 919 920 case WM_SETREDRAW: 921 if(wParam) 922 SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) | WS_VISIBLE); 923 else SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) & ~WS_VISIBLE); 924 925 return 0; //TODO 926 927 case WM_NCCREATE: 928 return(TRUE); 929 930 case WM_CTLCOLORMSGBOX: 931 case WM_CTLCOLOREDIT: 932 case WM_CTLCOLORLISTBOX: 933 case WM_CTLCOLORBTN: 934 case WM_CTLCOLORDLG: 935 case WM_CTLCOLORSTATIC: 936 case WM_CTLCOLORSCROLLBAR: 937 SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); 938 SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT)); 939 return GetSysColorBrush(COLOR_BTNFACE); 940 941 case WM_PARENTNOTIFY: 942 return 0; 943 944 case WM_MOUSEACTIVATE: 945 { 946 DWORD dwStyle = GetWindowLongA(GWL_STYLE); 947 DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE); 948 dprintf(("DefWndProc: WM_MOUSEACTIVATE for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam)))); 949 if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) ) 950 { 951 if(getParent()) { 952 LRESULT rc = getParent()->SendMessageA(WM_MOUSEACTIVATE, wParam, lParam ); 953 if(rc) return rc; 954 } 955 } 956 return (LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE; 957 } 958 case WM_SETCURSOR: 959 { 960 DWORD dwStyle = GetWindowLongA(GWL_STYLE); 961 DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE); 962 dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam)))); 963 if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) ) 964 { 965 if(getParent()) { 966 LRESULT rc = getParent()->SendMessageA(WM_SETCURSOR, wParam, lParam); 967 if(rc) return rc; 968 } 969 } 970 return 1; 971 } 972 case WM_MOUSEMOVE: 973 return 0; 974 975 case WM_ERASEBKGND: 976 case WM_ICONERASEBKGND: 977 return 0; 978 979 case WM_NCLBUTTONDOWN: 980 case WM_NCLBUTTONUP: 981 case WM_NCLBUTTONDBLCLK: 982 case WM_NCRBUTTONUP: 983 case WM_NCRBUTTONDOWN: 984 case WM_NCRBUTTONDBLCLK: 985 case WM_NCMBUTTONDOWN: 986 case WM_NCMBUTTONUP: 987 case WM_NCMBUTTONDBLCLK: 988 return 0; //TODO: Send WM_SYSCOMMAND if required 989 990 case WM_NCHITTEST: //TODO: 991 return 0; 992 993 default: 994 return 1; 995 } 996 } 997 //****************************************************************************** 998 //****************************************************************************** 999 LRESULT Win32Window::DefWindowProcW(UINT Msg, WPARAM wParam, LPARAM lParam) 1000 { 1001 switch(Msg) 1002 { 1003 case WM_GETTEXTLENGTH: 1004 return wndNameLength; 1005 1006 case WM_GETTEXT: //TODO: SS_ICON controls 1007 lstrcpynW((LPWSTR)lParam, windowNameW, wParam); 1008 return min(wndNameLength, wParam); 1009 1010 default: 1011 return DefWindowProcA(Msg, wParam, lParam); 1012 } 872 1013 } 873 1014 //****************************************************************************** … … 897 1038 return(0); 898 1039 } 1040 case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc 1041 return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam); 1042 899 1043 case WM_LBUTTONDOWN: 900 1044 case WM_MBUTTONDOWN: … … 937 1081 return(1); 938 1082 } 1083 case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc 1084 return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam); 1085 939 1086 case WM_LBUTTONDOWN: 940 1087 case WM_MBUTTONDOWN: … … 1100 1247 Win32Resource *winres = (Win32Resource *)hMenu; 1101 1248 1249 dprintf(("SetMenu %x", hMenu)); 1102 1250 if(HIWORD(winres) == 0) { 1103 1251 dprintf(("Win32Window:: Win32Resource *winres == 0")); 1104 SetLastError(ERROR_INVALID_PARAMETER);1252 SetLastError(ERROR_INVALID_PARAMETER); 1105 1253 return FALSE; 1106 1254 } -
trunk/src/user32/new/win32wnd.h
r391 r392 1 /* $Id: win32wnd.h,v 1.1 8 1999-07-25 09:19:22sandervl Exp $ */1 /* $Id: win32wnd.h,v 1.19 1999-07-25 15:51:56 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Code for OS/2 … … 43 43 #define WM_WIN32_POSTMESSAGEA 0x4000 44 44 #define WM_WIN32_POSTMESSAGEW 0x4001 45 46 #define MAX_WINDOW_NAMELENGTH 256 45 47 46 48 class Win32Window : private GenericObject, private ChildWindow … … 73 75 ULONG MsgEraseBackGround(ULONG hps); 74 76 ULONG MsgSetText(LPSTR lpsz, LONG cch); 77 ULONG MsgGetTextLength(); 78 char *MsgGetText(); 75 79 76 80 virtual LONG SetWindowLongA(int index, ULONG value); … … 134 138 BOOL PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam); 135 139 BOOL PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam); 136 LRESULT DefWindowProcA( HWND hwnd,UINT msg, WPARAM wParam, LPARAM lParam);137 LRESULT DefWindowProcW( HWND hwnd,UINT msg, WPARAM wParam, LPARAM lParam);140 LRESULT DefWindowProcA(UINT msg, WPARAM wParam, LPARAM lParam); 141 LRESULT DefWindowProcW(UINT msg, WPARAM wParam, LPARAM lParam); 138 142 139 143 void NotifyParent(UINT Msg, WPARAM wParam, LPARAM lParam); … … 192 196 193 197 BOOL isIcon; 198 BOOL fCreated; 194 199 195 200 Win32Window *owner; … … 199 204 Win32Resource *iconResource; 200 205 201 char *windowName; 206 char windowNameA[MAX_WINDOW_NAMELENGTH]; 207 WCHAR windowNameW[MAX_WINDOW_NAMELENGTH]; 202 208 ULONG wndNameLength; 203 209 204 char *windowText;205 ULONG wndTextLength;206 207 210 ULONG *userWindowLong; 208 211 ULONG nrUserWindowLong; … … 277 280 #define KEY_PREVDOWN 2 278 281 #define KEY_UP 4 282 #define KEY_DEADKEY 8 279 283 280 284 #endif //__cplusplus -
trunk/src/user32/new/window.cpp
r391 r392 1 /* $Id: window.cpp,v 1.1 0 1999-07-25 09:19:22sandervl Exp $ */1 /* $Id: window.cpp,v 1.11 1999-07-25 15:51:57 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 647 647 #endif 648 648 return O32_FindWindow(arg3, arg4); 649 }650 //******************************************************************************651 //******************************************************************************652 BOOL WIN32API FlashWindow(HWND hwnd, BOOL fFlash)653 {654 dprintf(("FlashWindow %x %d\n", hwnd, fFlash));655 return OSLibWinFlashWindow(Win32Window::Win32ToOS2Handle(hwnd), fFlash);656 }657 //******************************************************************************658 //******************************************************************************659 BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6)660 {661 BOOL rc;662 663 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6);664 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc));665 return(rc);666 }667 //******************************************************************************668 //******************************************************************************669 BOOL WIN32API AdjustWindowRect( PRECT arg1, DWORD arg2, BOOL arg3)670 {671 #ifdef DEBUG672 WriteLog("USER32: AdjustWindowRect\n");673 #endif674 return O32_AdjustWindowRect(arg1, arg2, arg3);675 }676 //******************************************************************************677 //******************************************************************************678 BOOL WIN32API AdjustWindowRectEx( PRECT arg1, DWORD arg2, BOOL arg3, DWORD arg4)679 {680 #ifdef DEBUG681 WriteLog("USER32: AdjustWindowRectEx\n");682 #endif683 return O32_AdjustWindowRectEx(arg1, arg2, arg3, arg4);684 }685 //******************************************************************************686 //******************************************************************************687 BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2)688 {689 #ifdef DEBUG690 //// WriteLog("USER32: ClientToScreen\n");691 #endif692 return O32_ClientToScreen(arg1, arg2);693 }694 //******************************************************************************695 //******************************************************************************696 HDWP WIN32API BeginDeferWindowPos( int arg1)697 {698 #ifdef DEBUG699 WriteLog("USER32: BeginDeferWindowPos\n");700 #endif701 return O32_BeginDeferWindowPos(arg1);702 }703 //******************************************************************************704 //******************************************************************************705 HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8)706 {707 #ifdef DEBUG708 WriteLog("USER32: DeferWindowPos\n");709 #endif710 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);711 }712 //******************************************************************************713 //******************************************************************************714 HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2)715 {716 #ifdef DEBUG717 WriteLog("USER32: ChildWindowFromPoint\n");718 #endif719 return O32_ChildWindowFromPoint(arg1, arg2);720 }721 //******************************************************************************722 //******************************************************************************723 HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags)724 {725 #ifdef DEBUG726 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n");727 #endif728 return O32_ChildWindowFromPoint(arg1, arg2);729 }730 //******************************************************************************731 //******************************************************************************732 BOOL WIN32API CloseWindow(HWND hwnd)733 {734 Win32Window *window;735 736 window = Win32Window::GetWindowFromHandle(hwnd);737 if(!window) {738 dprintf(("CloseWindow, window %x not found", hwnd));739 return 0;740 }741 dprintf(("CloseWindow %x\n", hwnd));742 return window->CloseWindow();743 }744 //******************************************************************************745 //******************************************************************************746 HWND WIN32API WindowFromDC(HDC hdc)747 {748 #ifdef DEBUG749 WriteLog("USER32: WindowFromDC\n");750 #endif751 return O32_WindowFromDC(hdc);752 }753 //******************************************************************************754 //TODO: Does this return handles of hidden or disabled windows?755 //******************************************************************************756 HWND WIN32API WindowFromPoint( POINT point)757 {758 HWND hwnd;759 760 dprintf(("WindowFromPoint (%d,%d)\n", point.x, point.y));761 hwnd = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&point);762 if(hwnd) {763 return Win32Window::OS2ToWin32Handle(hwnd);764 }765 return 0;766 }767 //******************************************************************************768 //******************************************************************************769 BOOL WIN32API IsWindowUnicode(HWND hwnd)770 {771 Win32Window *window;772 773 window = Win32Window::GetWindowFromHandle(hwnd);774 if(!window) {775 dprintf(("IsWindowUnicode, window %x not found", hwnd));776 return 0;777 }778 return window->IsUnicode();779 }780 /*****************************************************************************781 * Name : WORD WIN32API CascadeWindows782 * Purpose : The CascadeWindows function cascades the specified windows or783 * the child windows of the specified parent window.784 * Parameters: HWND hwndParent handle of parent window785 * UINT wHow types of windows not to arrange786 * CONST RECT * lpRect rectangle to arrange windows in787 * UINT cKids number of windows to arrange788 * const HWND FAR * lpKids array of window handles789 * Variables :790 * Result : If the function succeeds, the return value is the number of windows arranged.791 * If the function fails, the return value is zero.792 * Remark :793 * Status : UNTESTED STUB794 *795 * Author : Patrick Haller [Thu, 1998/02/26 11:55]796 *****************************************************************************/797 798 WORD WIN32API CascadeWindows(HWND hwndParent,799 UINT wHow,800 CONST LPRECT lpRect,801 UINT cKids,802 const HWND *lpKids)803 {804 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n",805 hwndParent,806 wHow,807 lpRect,808 cKids,809 lpKids));810 811 return (0);812 649 } 813 650 /***************************************************************************** … … 845 682 return (NULL); 846 683 } 684 //****************************************************************************** 685 //****************************************************************************** 686 BOOL WIN32API FlashWindow(HWND hwnd, BOOL fFlash) 687 { 688 dprintf(("FlashWindow %x %d\n", hwnd, fFlash)); 689 return OSLibWinFlashWindow(Win32Window::Win32ToOS2Handle(hwnd), fFlash); 690 } 691 //****************************************************************************** 692 //****************************************************************************** 693 BOOL WIN32API MoveWindow(HWND arg1, int arg2, int arg3, int arg4, int arg5, BOOL arg6) 694 { 695 BOOL rc; 696 697 rc = O32_MoveWindow(arg1, arg2, arg3, arg4, arg5, arg6); 698 dprintf(("USER32: MoveWindow %X to (%d,%d) size (%d,%d), repaint = %d returned %d\n", arg1, arg2, arg3, arg4, arg5, arg6, rc)); 699 return(rc); 700 } 701 //****************************************************************************** 702 //****************************************************************************** 703 BOOL WIN32API ClientToScreen( HWND arg1, PPOINT arg2) 704 { 705 #ifdef DEBUG 706 //// WriteLog("USER32: ClientToScreen\n"); 707 #endif 708 return O32_ClientToScreen(arg1, arg2); 709 } 710 //****************************************************************************** 711 //****************************************************************************** 712 HDWP WIN32API BeginDeferWindowPos( int arg1) 713 { 714 #ifdef DEBUG 715 WriteLog("USER32: BeginDeferWindowPos\n"); 716 #endif 717 return O32_BeginDeferWindowPos(arg1); 718 } 719 //****************************************************************************** 720 //****************************************************************************** 721 HDWP WIN32API DeferWindowPos( HDWP arg1, HWND arg2, HWND arg3, int arg4, int arg5, int arg6, int arg7, UINT arg8) 722 { 723 #ifdef DEBUG 724 WriteLog("USER32: DeferWindowPos\n"); 725 #endif 726 return O32_DeferWindowPos(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); 727 } 728 //****************************************************************************** 729 //****************************************************************************** 730 HWND WIN32API ChildWindowFromPoint( HWND arg1, POINT arg2) 731 { 732 #ifdef DEBUG 733 WriteLog("USER32: ChildWindowFromPoint\n"); 734 #endif 735 return O32_ChildWindowFromPoint(arg1, arg2); 736 } 737 //****************************************************************************** 738 //****************************************************************************** 739 HWND WIN32API ChildWindowFromPointEx(HWND arg1, POINT arg2, UINT uFlags) 740 { 741 #ifdef DEBUG 742 WriteLog("USER32: ChildWindowFromPointEx, not completely supported!\n"); 743 #endif 744 return O32_ChildWindowFromPoint(arg1, arg2); 745 } 746 //****************************************************************************** 747 //****************************************************************************** 748 BOOL WIN32API CloseWindow(HWND hwnd) 749 { 750 Win32Window *window; 751 752 window = Win32Window::GetWindowFromHandle(hwnd); 753 if(!window) { 754 dprintf(("CloseWindow, window %x not found", hwnd)); 755 return 0; 756 } 757 dprintf(("CloseWindow %x\n", hwnd)); 758 return window->CloseWindow(); 759 } 760 //****************************************************************************** 761 //TODO: Does this return handles of hidden or disabled windows? 762 //****************************************************************************** 763 HWND WIN32API WindowFromPoint( POINT point) 764 { 765 HWND hwnd; 766 767 dprintf(("WindowFromPoint (%d,%d)\n", point.x, point.y)); 768 hwnd = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&point); 769 if(hwnd) { 770 return Win32Window::OS2ToWin32Handle(hwnd); 771 } 772 return 0; 773 } 774 //****************************************************************************** 775 //****************************************************************************** 776 BOOL WIN32API IsWindowUnicode(HWND hwnd) 777 { 778 Win32Window *window; 779 780 window = Win32Window::GetWindowFromHandle(hwnd); 781 if(!window) { 782 dprintf(("IsWindowUnicode, window %x not found", hwnd)); 783 return 0; 784 } 785 return window->IsUnicode(); 786 } 787 /***************************************************************************** 788 * Name : WORD WIN32API CascadeWindows 789 * Purpose : The CascadeWindows function cascades the specified windows or 790 * the child windows of the specified parent window. 791 * Parameters: HWND hwndParent handle of parent window 792 * UINT wHow types of windows not to arrange 793 * CONST RECT * lpRect rectangle to arrange windows in 794 * UINT cKids number of windows to arrange 795 * const HWND FAR * lpKids array of window handles 796 * Variables : 797 * Result : If the function succeeds, the return value is the number of windows arranged. 798 * If the function fails, the return value is zero. 799 * Remark : 800 * Status : UNTESTED STUB 801 * 802 * Author : Patrick Haller [Thu, 1998/02/26 11:55] 803 *****************************************************************************/ 804 805 WORD WIN32API CascadeWindows(HWND hwndParent, 806 UINT wHow, 807 CONST LPRECT lpRect, 808 UINT cKids, 809 const HWND *lpKids) 810 { 811 dprintf(("USER32:CascadeWindows(%08xh,%u,%08xh,%u,%08x) not implemented.\n", 812 hwndParent, 813 wHow, 814 lpRect, 815 cKids, 816 lpKids)); 817 818 return (0); 819 } 847 820 /***************************************************************************** 848 821 * Name : BOOL WIN32API SwitchToThisWindow -
trunk/src/user32/new/wingdi.cpp
r391 r392 1 /* $Id: wingdi.cpp,v 1. 7 1999-07-25 09:19:22sandervl Exp $ */1 /* $Id: wingdi.cpp,v 1.8 1999-07-25 15:51:57 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window graphics apis for OS/2 … … 65 65 window = Win32Window::GetWindowFromHandle(hwnd); 66 66 if(!window) { 67 dprintf(("GetDC, window %x not found", hwnd)); 68 return 0; 67 dprintf(("GetDC, window %x not found", hwnd)); 68 #ifdef OPEN32_GDI 69 dprintf(("GetDC %x", hwnd)); 70 return O32_GetDC(0); 71 #else 72 //desktop window? 73 dprintf(("GetDC %x", hwnd)); 74 return OSLibWinGetPS(OSLIB_HWND_DESKTOP); 75 #endif 69 76 } 70 77 dprintf(("GetDC %x", hwnd)); … … 89 96 int WIN32API ReleaseDC(HWND hwnd, HDC hdc) 90 97 { 98 dprintf(("ReleaseDC %x %x", hwnd, hdc)); 91 99 #ifdef OPEN32_GDI 92 100 return O32_ReleaseDC(hwnd,hdc); … … 115 123 //****************************************************************************** 116 124 //****************************************************************************** 125 HWND WIN32API WindowFromDC(HDC hdc) 126 { 127 dprintf(("USER32: WindowFromDC\n")); 128 #ifdef OPEN32_GDI 129 return O32_WindowFromDC(hdc); 130 #else 131 ????? 132 #endif 133 } 134 //****************************************************************************** 135 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.