- Timestamp:
- Oct 23, 1999, 12:21:45 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/Makefile
r1368 r1408 1 # $Id: Makefile,v 1.3 3 1999-10-20 06:38:07sandervl Exp $1 # $Id: Makefile,v 1.34 1999-10-23 10:21:43 sandervl Exp $ 2 2 3 3 # … … 91 91 uitools.obj: uitools.cpp win32wbase.h 92 92 unknown.obj: unknown.cpp 93 wndmsg.obj: wndmsg.cpp wndmsg.h 93 wndmsg.obj: wndmsg.cpp wndmsg.h $(PDWIN32_INCLUDE)\spy.h 94 94 95 95 spy.obj: spy.cpp $(PDWIN32_INCLUDE)\spy.h -
trunk/src/user32/pmframe.cpp
r1405 r1408 1 /* $Id: pmframe.cpp,v 1. 9 1999-10-22 18:11:46sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.10 1999-10-23 10:21:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 180 180 switch(msg) 181 181 { 182 #if 1182 #if 0 183 183 case WM_ADJUSTWINDOWPOS: 184 184 { … … 194 194 goto RunDefFrameProc; 195 195 if(!win32wnd->CanReceiveSizeMsgs()) { 196 break;196 goto RunDefFrameProc; 197 197 } 198 198 … … 233 233 } 234 234 235 case WM_WINDOWPOSCHANGED:236 {237 PSWP pswp = (PSWP)mp1;238 SWP swpOld = *(pswp + 1);239 WINDOWPOS wp;240 ULONG parentHeight = 0;241 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE;242 LONG yDelta = pswp->cy - swpOld.cy;243 LONG xDelta = pswp->cx - swpOld.cx;244 245 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));246 RestoreOS2TIB();247 rc = OldFrameProc(hwnd,msg,mp1,mp2);248 SetWin32TIB();249 // dprintf(("After calling frameproc: (%x) %x %x (%d,%d) (%d,%d)", mp2, hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy));250 251 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0)252 break;253 254 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) {255 if (win32wnd->isChild()) {256 if(win32wnd->getParent()) {257 hParent = win32wnd->getParent()->getOS2WindowHandle();258 }259 else break; //parent has just been destroyed260 }261 }262 OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hwnd);263 264 //delta is difference between old and new client height265 yDelta = swpOld.cy - win32wnd->getWindowHeight();266 267 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy);268 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy);269 270 if(!win32wnd->CanReceiveSizeMsgs())271 break;272 273 wp.hwnd = win32wnd->getWindowHandle();274 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM))275 {276 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind);277 if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle();278 }279 280 if (yDelta != 0 || xDelta != 0)281 {282 HENUM henum = WinBeginEnumWindows(WinWindowFromID(pswp->hwnd, FID_CLIENT));283 SWP swp[10];284 int i = 0;285 HWND hwnd;286 287 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE)288 {289 #if 0290 if (mdiClient )291 {292 continue;293 }294 #endif295 WinQueryWindowPos(hwnd, &(swp[i]));296 297 #ifdef DEBUG298 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd);299 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd,300 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl));301 #endif302 303 if(swp[i].y != 0) {304 //child window at offset <> 0 from client area -> offset now changes305 swp[i].y += yDelta;306 swp[i].fl &= ~(SWP_NOREDRAW);307 }308 //else child window with the same start coorindates as the client area309 //The app should resize it.310 311 if (i == 9)312 {313 WinSetMultWindowPos(GetThreadHAB(), swp, 10);314 i = 0;315 }316 else317 {318 i++;319 }320 }321 322 WinEndEnumWindows(henum);323 324 if (i)325 WinSetMultWindowPos(GetThreadHAB(), swp, i);326 }327 if (yDelta != 0)328 {329 POINT pt;330 if(GetCaretPos (&pt) == TRUE)331 {332 pt.y -= yDelta;333 SetCaretPos (pt.x, pt.y);334 }335 }336 win32wnd->MsgPosChanged((LPARAM)&wp);337 break;338 }339 235 #else 340 236 case WM_ADJUSTWINDOWPOS: -
trunk/src/user32/pmwindow.cpp
r1405 r1408 1 /* $Id: pmwindow.cpp,v 1.4 0 1999-10-22 18:11:47sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.41 1999-10-23 10:21:43 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 247 247 break; 248 248 249 #if 1 250 case WM_ADJUSTWINDOWPOS: 251 { 252 PSWP pswp = (PSWP)mp1; 253 SWP swpOld; 254 WINDOWPOS wp; 255 ULONG parentHeight = 0; 256 HWND hParent = NULLHANDLE, hFrame = NULLHANDLE, hwndAfter; 257 258 dprintf(("OS2: WM_ADJUSTWINDOWPOS %x %x %x (%d,%d) (%d,%d)", hwnd, pswp->hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 259 260 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) goto RunDefWndProc;; 261 262 //SvL: TODO: Workaround. Why is this happening? 263 // When this flag is set the coordinates are 0, even though SWP_SIZE & SWP_MOVE are set. 264 // if ((pswp->fl & SWP_NOADJUST)) goto RunDefWndProc; 265 266 if(!win32wnd->CanReceiveSizeMsgs()) goto RunDefWndProc;; 267 268 WinQueryWindowPos(hwnd, &swpOld); 269 270 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 271 if (win32wnd->isChild()) { 272 if(win32wnd->getParent()) { 273 hParent = win32wnd->getParent()->getOS2WindowHandle(); 274 } 275 else goto RunDefWndProc;; 276 } 277 } 278 hwndAfter = pswp->hwndInsertBehind; 279 hFrame = win32wnd->getOS2FrameWindowHandle(); 280 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hFrame); 281 282 wp.hwnd = win32wnd->getWindowHandle(); 283 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 284 { 285 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 286 if(wndAfter) wp.hwndInsertAfter = wndAfter->getWindowHandle(); 287 } 288 if(win32wnd->MsgPosChanging((LPARAM)&wp) == 0) 289 {//app or default window handler changed wp 290 dprintf(("OS2: WM_ADJUSTWINDOWPOS, app changed windowpos struct")); 291 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 292 OSLibMapWINDOWPOStoSWP(&wp, pswp, &swpOld, hParent, hFrame); 293 dprintf(("%x (%d,%d), (%d,%d)", pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 294 pswp->fl |= SWP_NOADJUST; 295 pswp->hwndInsertBehind = hwndAfter; 296 pswp->hwnd = hFrame; 297 298 WinSetMultWindowPos(GetThreadHAB(), pswp, 1); 299 return (MRESULT)0; 300 } 301 break; 302 } 303 #endif 304 305 case WM_WINDOWPOSCHANGED: 306 { 307 PSWP pswp = (PSWP)mp1; 308 SWP swpOld = *(pswp + 1); 309 WINDOWPOS wp; 310 HWND hParent = NULLHANDLE; 311 LONG yDelta = pswp->cy - swpOld.cy; 312 LONG xDelta = pswp->cx - swpOld.cx; 313 314 dprintf(("OS2: WM_WINDOWPOSCHANGED %x %x (%d,%d) (%d,%d)", hwnd, pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 315 316 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) break; 317 if (!win32wnd->CanReceiveSizeMsgs()) break; 318 319 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 320 if (win32wnd->isChild()) { 321 if(win32wnd->getParent()) { 322 hParent = win32wnd->getParent()->getOS2WindowHandle(); 323 } 324 else goto RunDefWndProc; //parent has just been destroyed 325 } 326 } 327 OSLibMapSWPtoWINDOWPOS(pswp, &wp, &swpOld, hParent, hwnd); 328 329 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 330 win32wnd->setClientRect(swpOld.x, swpOld.y, swpOld.x + swpOld.cx, swpOld.y + swpOld.cy); 331 332 wp.hwnd = win32wnd->getWindowHandle(); 333 if ((pswp->fl & SWP_ZORDER) && (pswp->hwndInsertBehind > HWND_BOTTOM)) 334 { 335 Win32BaseWindow *wndAfter = Win32BaseWindow::GetWindowFromOS2Handle(pswp->hwndInsertBehind); 336 wp.hwndInsertAfter = wndAfter->getWindowHandle(); 337 } 338 339 if (yDelta != 0 || xDelta != 0) 340 { 341 HENUM henum = WinBeginEnumWindows(pswp->hwnd); 342 SWP swp[10]; 343 int i = 0; 344 HWND hwnd; 345 346 while ((hwnd = WinGetNextWindow(henum)) != NULLHANDLE) 347 { 348 #if 0 349 if (mdiClient ) 350 { 351 continue; 352 } 353 #endif 354 WinQueryWindowPos(hwnd, &(swp[i])); 355 356 #ifdef DEBUG 357 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromOS2Handle(hwnd); 358 dprintf(("ENUMERATE %x delta %d (%d,%d) (%d,%d) %x", (window) ? window->getWindowHandle() : hwnd, 359 yDelta, swp[i].x, swp[i].y, swp[i].cx, swp[i].cy, swp[i].fl)); 360 #endif 361 362 if(swp[i].y != 0) { 363 //child window at offset <> 0 from client area -> offset now changes 364 swp[i].y += yDelta; 365 swp[i].fl &= ~(SWP_NOREDRAW); 366 } 367 //else child window with the same start coorindates as the client area 368 //The app should resize it. 369 370 if (i == 9) 371 { 372 WinSetMultWindowPos(GetThreadHAB(), swp, 10); 373 i = 0; 374 } 375 else 376 { 377 i++; 378 } 379 } 380 381 WinEndEnumWindows(henum); 382 383 if (i) 384 WinSetMultWindowPos(GetThreadHAB(), swp, i); 385 } 386 if (yDelta != 0) 387 { 388 POINT pt; 389 if(GetCaretPos (&pt) == TRUE) 390 { 391 pt.y -= yDelta; 392 SetCaretPos (pt.x, pt.y); 393 } 394 } 395 win32wnd->MsgPosChanged((LPARAM)&wp); 396 397 goto RunDefWndProc; 398 } 399 249 400 case WM_SIZE: 250 401 { -
trunk/src/user32/win32wbase.cpp
r1405 r1408 1 /* $Id: win32wbase.cpp,v 1. 59 1999-10-22 18:11:48sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.60 1999-10-23 10:21:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 25 25 #include <win32wbase.h> 26 26 #include <winres.h> 27 #include <spy.h>28 27 #include "wndmsg.h" 29 28 #include "hooks.h" … … 1618 1617 } 1619 1618 1620 if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often 1621 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 1622 dprintf(("SendMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1623 } 1619 DebugPrintMessage(getWindowHandle(), Msg, wParam, lParam, FALSE, FALSE); 1624 1620 1625 1621 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg … … 1679 1675 } 1680 1676 1681 if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE) {//sent *very* often 1682 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 1683 dprintf(("SendMessageW %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1684 } 1677 DebugPrintMessage(getWindowHandle(), Msg, wParam, lParam, TRUE, FALSE); 1685 1678 1686 1679 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg … … 1733 1726 BOOL fInternalMsgBackup = fInternalMsg; 1734 1727 1735 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 1736 dprintf(("SendInternalMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1728 DebugPrintMessage(getWindowHandle(), Msg, wParam, lParam, FALSE, TRUE); 1737 1729 1738 1730 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg … … 1780 1772 BOOL fInternalMsgBackup = fInternalMsg; 1781 1773 1782 if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE) 1783 dprintf(("SendInternalMessageW %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam)); 1774 DebugPrintMessage(getWindowHandle(), Msg, wParam, lParam, TRUE, TRUE); 1784 1775 1785 1776 if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg -
trunk/src/user32/wndmsg.cpp
r1357 r1408 1 /* $Id: wndmsg.cpp,v 1. 6 1999-10-19 12:52:31sandervl Exp $ */1 /* $Id: wndmsg.cpp,v 1.7 1999-10-23 10:21:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message text function for OS/2 … … 14 14 #include <string.h> 15 15 #include <win\winmfcmsg.h> 16 #include <spy.h> 16 17 17 18 #ifdef DEBUG … … 609 610 { "WM_QUERYAFXWNDPROC(MFC)", WM_QUERYAFXWNDPROC, // 0x0360 610 611 0}, 611 { "WM_SIZEPARENT(MFC)", WM_SIZEPARENT, 612 0}, 613 { "WM_SETMESSAGESTRING(MFC)", WM_SETMESSAGESTRING, 614 0}, 615 { "WM_IDLEUPDATECMDUI(MFC)", WM_IDLEUPDATECMDUI, 616 0}, 617 { "WM_INITIALUPDATE(MFC)", WM_INITIALUPDATE, 618 0}, 619 { "WM_COMMANDHELP(MFC)", WM_COMMANDHELP, 620 0}, 621 { "WM_HELPHITTEST(MFC)", WM_HELPHITTEST, 622 0}, 623 { "WM_EXITHELPMODE(MFC)", WM_EXITHELPMODE, 624 0}, 625 { "WM_RECALCPARENT(MFC)", WM_RECALCPARENT, 626 0}, 627 { "WM_SIZECHILD(MFC)", WM_SIZECHILD, 628 0}, 629 { "WM_KICKIDLE(MFC)", WM_KICKIDLE, 630 0}, 631 { "WM_QUERYCENTERWND(MFC)", WM_QUERYCENTERWND, 632 0}, 633 { "WM_DISABLEMODAL(MFC)", WM_DISABLEMODAL, 634 0}, 635 { "WM_FLOATSTATUS(MFC)", WM_FLOATSTATUS, 636 0}, 637 { "WM_ACTIVATETOPLEVEL(MFC)", WM_ACTIVATETOPLEVEL, 638 0}, 639 { "WM_QUERY3DCONTROLS(MFC)", WM_QUERY3DCONTROLS, 640 0}, 641 { "WM_SOCKET_NOTIFY(MFC)", WM_SOCKET_NOTIFY, 642 0}, 643 { "WM_SOCKET_DEAD(MFC)", WM_SOCKET_DEAD, 644 0}, 645 { "WM_POPMESSAGESTRING(MFC)", WM_POPMESSAGESTRING, 646 0}, 647 { "WM_OCC_LOADFROMSTREAM(MFC)", WM_OCC_LOADFROMSTREAM, 612 { "WM_SIZEPARENT(MFC)", WM_SIZEPARENT, // 0x0361 613 0}, 614 { "WM_SETMESSAGESTRING(MFC)", WM_SETMESSAGESTRING, // 0x0362 615 0}, 616 { "WM_IDLEUPDATECMDUI(MFC)", WM_IDLEUPDATECMDUI, // 0x0363 617 0}, 618 { "WM_INITIALUPDATE(MFC)", WM_INITIALUPDATE, // 0x0364 619 0}, 620 { "WM_COMMANDHELP(MFC)", WM_COMMANDHELP, // 0x0365 621 0}, 622 { "WM_HELPHITTEST(MFC)", WM_HELPHITTEST, // 0x0366 623 0}, 624 { "WM_EXITHELPMODE(MFC)", WM_EXITHELPMODE, // 0x0367 625 0}, 626 { "WM_RECALCPARENT(MFC)", WM_RECALCPARENT, // 0x0368 627 0}, 628 { "WM_SIZECHILD(MFC)", WM_SIZECHILD, // 0x0369 629 0}, 630 { "WM_KICKIDLE(MFC)", WM_KICKIDLE, // 0x036A 631 0}, 632 { "WM_QUERYCENTERWND(MFC)", WM_QUERYCENTERWND, // 0x036B 633 0}, 634 { "WM_DISABLEMODAL(MFC)", WM_DISABLEMODAL, // 0x036C 635 0}, 636 { "WM_FLOATSTATUS(MFC)", WM_FLOATSTATUS, // 0x036D 637 0}, 638 { "WM_ACTIVATETOPLEVEL(MFC)", WM_ACTIVATETOPLEVEL, // 0x036E 639 0}, 640 { "WM_QUERY3DCONTROLS(MFC)", WM_QUERY3DCONTROLS, // 0x036F 641 0}, 642 { "WM_SOCKET_NOTIFY(MFC)", WM_SOCKET_NOTIFY, // 0x0373 643 0}, 644 { "WM_SOCKET_DEAD(MFC)", WM_SOCKET_DEAD, // 0x0374 645 0}, 646 { "WM_POPMESSAGESTRING(MFC)", WM_POPMESSAGESTRING, // 0x0375 647 0}, 648 { "WM_OCC_LOADFROMSTREAM(MFC)", WM_OCC_LOADFROMSTREAM, // 0x0376 648 649 0}, 649 650 { "WM_OCC_LOADFROMSTORAGE(MFC)", WM_OCC_LOADFROMSTORAGE, // 0x0377 650 651 0}, 651 { "WM_OCC_INITNEW(MFC)", WM_OCC_INITNEW, 652 { "WM_OCC_INITNEW(MFC)", WM_OCC_INITNEW, // 0x0378 652 653 0}, 653 654 { "WM_QUEUE_SENTINEL(MFC)", WM_QUEUE_SENTINEL, // 0x0379 … … 692 693 return(msgtxt); 693 694 } 695 696 697 void DebugPrintMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode, BOOL fInternalMsg) 698 { 699 char unicode; 700 701 if(fUnicode) 702 unicode = 'W'; 703 else unicode = 'A'; 704 705 if(Msg != WM_GETDLGCODE && Msg != WM_ENTERIDLE && Msg != WM_NCHITTEST && Msg != WM_KICKIDLE) 706 {//sent *very* often 707 if(PostSpyMessage(hwnd, Msg, wParam, lParam) == FALSE) 708 { 709 if(fInternalMsg) { 710 dprintf(("SendInternalMessage%c %s for %x %x %x", unicode, GetMsgText(Msg), hwnd, wParam, lParam)); 711 } 712 else dprintf(("SendMessage%c %s for %x %x %x", unicode, GetMsgText(Msg), hwnd, wParam, lParam)); 713 } 714 } 715 } 716 694 717 #endif -
trunk/src/user32/wndmsg.h
r949 r1408 1 /* $Id: wndmsg.h,v 1. 3 1999-09-15 23:19:03sandervl Exp $ */1 /* $Id: wndmsg.h,v 1.4 1999-10-23 10:21:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window message text function for OS/2 … … 14 14 #ifdef DEBUG 15 15 char *GetMsgText(int Msg); 16 void DebugPrintMessage(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode, BOOL fInternalMsg); 17 #else 18 #define DebugPrintMessage(a, b, c, d, e, f) 16 19 #endif 17 20
Note:
See TracChangeset
for help on using the changeset viewer.