Changeset 12998
- Timestamp:
- Jan 12, 2000, 1:41:20 PM (25 years ago)
- Location:
- tags/trunk/src/user32/new
- Files:
-
- 1 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/user32/new/makefile ¶
r12986 r12998 1 # $Id: makefile,v 1.5 6 2000-01-11 10:38:33sandervl Exp $1 # $Id: makefile,v 1.57 2000-01-12 12:40:41 sandervl Exp $ 2 2 3 3 # … … 115 115 icontitle.obj: icontitle.cpp $(PDWIN32_INCLUDE)\win\icontitle.h 116 116 117 msgbox.obj: msgbox.c pp117 msgbox.obj: msgbox.c 118 118 window.obj: window.cpp win32class.h win32wbase.h win32wndchild.h oslibwin.h win32wmdiclient.h win32wdesktop.h 119 119 windowmsg.obj: windowmsg.cpp win32class.h win32wbase.h win32wndchild.h oslibmsg.h -
TabularUnified tags/trunk/src/user32/new/menu.cpp ¶
r12993 r12998 1 /* $Id: menu.cpp,v 1. 7 2000-01-11 17:34:42 cbratschiExp $*/1 /* $Id: menu.cpp,v 1.8 2000-01-12 12:40:43 sandervl Exp $*/ 2 2 /* 3 3 * Menu functions … … 2402 2402 if( hNewWnd != pmt->hOwnerWnd ) 2403 2403 { 2404 ReleaseCapture(); 2404 ReleaseCapture(); 2405 2405 pmt->hOwnerWnd = hNewWnd; 2406 SetCapture(pmt->hOwnerWnd); //SvL: Don't know if this is good enough 2406 2407 //EVENT_Capture( pmt->hOwnerWnd, HTMENU ); //CB: todo 2407 2408 } … … 2594 2595 2595 2596 //EVENT_Capture( mt.hOwnerWnd, HTMENU ); //CB: todo 2597 //SvL: Set keyboard & mouse event capture 2598 SetCapture(mt.hOwnerWnd); 2596 2599 2597 2600 while (!fEndMenu) … … 2602 2605 /* we have to keep the message in the queue until it's 2603 2606 * clear that menu loop is not over yet. */ 2604 if (!GetMessageA(&msg,msg.hwnd,0,0)) break; 2607 // if (!GetMessageA(&msg,msg.hwnd,0,0)) break; 2608 //SvL: Getting messages for only the menu delays background paints (i.e. VPBuddy logo) 2609 if (!GetMessageA(&msg,0,0,0)) break; 2605 2610 TranslateMessage( &msg ); 2606 2611 mt.pt = msg.pt; … … 2610 2615 2611 2616 fRemove = FALSE; 2612 if 2617 if((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST)) 2613 2618 { 2614 2619 /* Find a menu for this mouse event */ -
TabularUnified tags/trunk/src/user32/new/oslibmsgtranslate.cpp ¶
r12983 r12998 1 /* $Id: oslibmsgtranslate.cpp,v 1.1 0 2000-01-10 23:29:12sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.11 2000-01-12 12:40:44 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 561 561 } 562 562 563 case WM_INITMENU:564 winMsg->message = WINWM_INITMENU;565 winMsg->wParam = (WPARAM)os2Msg->mp2; //hMenu566 break;567 568 case WM_MENUSELECT:569 case WM_MENUEND:570 case WM_NEXTMENU:571 goto dummymessage;572 573 563 case WM_TIMER: 574 564 if (os2Msg->mp2) … … 630 620 631 621 case WM_CONTEXTMENU: 632 { 633 OSLIBPOINT pt; 634 635 pt.x = (*(POINTS *)&os2Msg->mp1).x; 636 pt.y = (*(POINTS *)&os2Msg->mp1).y; 637 mapOS2ToWin32Point(os2Msg->hwnd,OSLIB_HWND_DESKTOP,&pt); 638 winMsg->message = WINWM_CONTEXTMENU; 639 winMsg->wParam = (WPARAM)win32wnd->getWindowHandle(); 640 winMsg->lParam = MAKELONG((USHORT)pt.x, (USHORT)pt.y); 641 break; 642 } 643 622 case WM_INITMENU: 623 case WM_MENUSELECT: 624 case WM_MENUEND: 625 case WM_NEXTMENU: 644 626 case WM_SYSCOLORCHANGE: 645 627 case WM_SYSVALUECHANGED: -
TabularUnified tags/trunk/src/user32/new/pmframe.cpp ¶
r12983 r12998 1 /* $Id: pmframe.cpp,v 1.1 0 2000-01-10 23:29:13sandervl Exp $ */1 /* $Id: pmframe.cpp,v 1.11 2000-01-12 12:40:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Frame Managment Code for OS/2 … … 107 107 { 108 108 case WM_FORMATFRAME: 109 { 110 PSWP pswp = (PSWP)mp1,swpClient; 111 RECTL *client = (PRECTL)mp2,rect; 112 RECT winRect; 113 INT ccount; 114 115 if (!win32wnd->IsWindowCreated()) goto RunDefFrameProc; 116 dprintf(("PMFRAME: WM_FORMATFRAME %x",hwnd)); 117 RestoreOS2TIB(); 118 ccount = (INT)OldFrameProc(hwnd,msg,mp1,mp2); 119 SetWin32TIB(); 120 dprintf(("Frame size: %d %d",win32wnd->getWindowWidth(),win32wnd->getWindowHeight())); 121 win32wnd->MsgFormatFrame(); 122 //CB: todo: use result for WM_CALCVALIDRECTS 123 mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 124 swpClient = &pswp[ccount-1]; 125 swpClient->x = rect.xLeft; 126 swpClient->y = rect.yBottom; 127 swpClient->cx = rect.xRight-rect.xLeft; 128 swpClient->cy = rect.yTop-rect.yBottom; 129 dprintf(("New client position: x=%d y=%d w=%d h=%d",swpClient->x,swpClient->y,swpClient->cx,swpClient->cy)); 130 RestoreOS2TIB(); 131 return (MRESULT)ccount; 132 } 109 break; 133 110 134 111 case WM_MINMAXFRAME: … … 141 118 { 142 119 win32wnd->setStyle((win32wnd->getStyle() & ~WS_MINIMIZE_W) | WS_MAXIMIZE_W); 143 } else if ((swp->fl & SWP_MINIMIZE) == SWP_MINIMIZE) 120 } 121 else if ((swp->fl & SWP_MINIMIZE) == SWP_MINIMIZE) 144 122 { 145 123 win32wnd->setStyle((win32wnd->getStyle() & ~WS_MAXIMIZE_W) | WS_MINIMIZE_W); 146 } else if ((swp->fl & SWP_RESTORE) == SWP_RESTORE) 124 } 125 else if ((swp->fl & SWP_RESTORE) == SWP_RESTORE) 147 126 { 148 127 win32wnd->setStyle(win32wnd->getStyle() & ~(WS_MINIMIZE_W | WS_MAXIMIZE_W)); … … 277 256 WINDOWPOS wp; 278 257 HWND hParent = NULLHANDLE; 258 RECTL rect; 259 SWP swpClient = {0}; 279 260 280 261 dprintf(("PMFRAME: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 281 262 282 263 if ((pswp->fl & (SWP_SIZE | SWP_MOVE | SWP_ZORDER)) == 0) 283 goto PosChangedEnd; 264 { 265 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 266 swpClient.hwndInsertBehind = 0; 267 swpClient.x = 0; 268 swpClient.y = 0; 269 swpClient.cx = 0; 270 swpClient.cy = 0; 271 swpClient.fl = pswp->fl & ~SWP_ZORDER; 272 WinSetMultWindowPos(thdb->hab, &swpClient, 1); 273 goto PosChangedEnd; 274 } 284 275 285 276 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { … … 293 284 OSLibMapSWPtoWINDOWPOSFrame(pswp, &wp, &swpOld, hParent, hwnd); 294 285 295 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 286 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 287 win32wnd->setWindowRect(wp.x, wp.y, wp.x+wp.cx, wp.y+wp.cy); 288 289 win32wnd->MsgFormatFrame(); 290 //CB: todo: use result for WM_CALCVALIDRECTS 291 mapWin32ToOS2Rect(WinQueryWindow(hwnd,QW_PARENT),hwnd,win32wnd->getClientRectPtr(),(PRECTLOS2)&rect); 292 293 swpClient.hwnd = win32wnd->getOS2WindowHandle(); 294 swpClient.hwndInsertBehind = 0; 295 swpClient.x = rect.xLeft; 296 swpClient.y = rect.yBottom; 297 swpClient.cx = rect.xRight-rect.xLeft; 298 swpClient.cy = rect.yTop-rect.yBottom; 299 //TODO: Get rid of SWP_SHOW; needed for winhlp32 button bar for now 300 swpClient.fl = (pswp->fl & ~SWP_ZORDER) | SWP_MOVE | SWP_SHOW; 301 WinSetMultWindowPos(thdb->hab, &swpClient, 1); 302 } 296 303 297 304 if(win32wnd->CanReceiveSizeMsgs()) 298 305 win32wnd->MsgPosChanged((LPARAM)&wp); 299 306 307 //update child positions: rectWindow is in window coordinates 308 if(pswp->fl & (SWP_MOVE | SWP_SIZE)) { 309 FrameUpdateChildPositions(win32wnd->getOS2WindowHandle()); 310 } 311 300 312 PosChangedEnd: 301 //update the client rect302 RECTL rectl;303 304 WinQueryWindowRect(win32wnd->getOS2FrameWindowHandle(),&rectl);305 mapOS2ToWin32Rect(win32wnd->getOS2FrameWindowHandle(),OSLIB_HWND_DESKTOP,(PRECTLOS2)&rectl,win32wnd->getWindowRect());306 WinQueryWindowRect(win32wnd->getOS2WindowHandle(),&rectl);307 mapOS2ToWin32Rect(win32wnd->getOS2WindowHandle(),WinQueryWindow(hwnd,QW_PARENT),(PRECTLOS2)&rectl,win32wnd->getClientRectPtr());308 309 //calls WM_FORMATFRAME if SWP_SIZE is set310 313 RestoreOS2TIB(); 311 rc = OldFrameProc(hwnd,msg,mp1,mp2); 312 SetWin32TIB(); 313 //update child positions: rectWindow is in window coordinates 314 FrameUpdateChildPositions(win32wnd->getOS2WindowHandle()); 315 RestoreOS2TIB(); 316 return rc; 314 return (MRESULT)FALSE; 317 315 } 318 316 … … 320 318 { 321 319 PRECTL oldRect = (PRECTL)mp1,newRect = oldRect+1; 322 UINT res = CVR_ALIGNLEFT | CVR_ALIGNTOP;320 UINT res = 0; //= CVR_ALIGNLEFT | CVR_ALIGNTOP; 323 321 324 322 //CB: todo: use WM_NCCALCSIZE result … … 334 332 335 333 //CB: PM sets client window position 336 RestoreOS2TIB();337 OldFrameProc(hwnd,msg,mp1,mp2);338 SetWin32TIB();334 // RestoreOS2TIB(); 335 // OldFrameProc(hwnd,msg,mp1,mp2); 336 // SetWin32TIB(); 339 337 340 338 RestoreOS2TIB(); -
TabularUnified tags/trunk/src/user32/new/pmwindow.cpp ¶
r12991 r12998 1 /* $Id: pmwindow.cpp,v 1.3 5 2000-01-11 13:52:18sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.36 2000-01-12 12:40:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 245 245 246 246 case WM_ADJUSTWINDOWPOS: 247 goto RunDefWndProc; 247 { 248 PSWP pswp = (PSWP)mp1; 249 dprintf(("PMWINDOW: WM_WINDOWPOSCHANGED (%x) %x %x (%d,%d) (%d,%d)", mp2, win32wnd->getWindowHandle(), pswp->fl, pswp->x, pswp->y, pswp->cx, pswp->cy)); 250 goto RunDefWndProc; 251 } 248 252 249 253 case WM_WINDOWPOSCHANGED: … … 366 370 break; 367 371 368 case WM_INITMENU:369 win32wnd->MsgInitMenu(pWinMsg);370 break;371 372 372 case WM_TIMER: 373 373 win32wnd->DispatchMsgA(pWinMsg); 374 goto RunDefWndProc;375 376 case WM_MENUSELECT:377 case WM_MENUEND:378 case WM_NEXTMENU:379 374 goto RunDefWndProc; 380 375 … … 434 429 goto RunDefWndProc; 435 430 431 case WM_INITMENU: 432 case WM_MENUSELECT: 433 case WM_MENUEND: 434 case WM_NEXTMENU: 436 435 case WM_SYSCOLORCHANGE: 437 436 case WM_SYSVALUECHANGED: -
TabularUnified tags/trunk/src/user32/new/user32.rc ¶
r12892 r12998 1 /* $Id: user32.rc,v 1. 7 2000-01-03 20:53:50 cbratschiExp $ */1 /* $Id: user32.rc,v 1.8 2000-01-12 12:40:46 sandervl Exp $ */ 2 2 /* converted from WINE */ 3 3 … … 806 806 #define OCR_APPSTARTING 32650 807 807 #define OCR_HELP 32651 /* only defined in Odin */ 808 809 810 MSGBOX DIALOG 100, 80, 216, 168 811 STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU 812 BEGIN 813 ICON "", 1088, 8, 20, 16, 16, WS_CHILD | WS_VISIBLE 814 LTEXT "", 100, 32, 4, 176, 48, WS_CHILD | WS_VISIBLE | WS_GROUP 815 PUSHBUTTON "&OK", 1, 16, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 816 PUSHBUTTON "&Cancel", 2, 64, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 817 PUSHBUTTON "&Abort", 3, 112, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 818 PUSHBUTTON "&Retry", 4, 160, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 819 PUSHBUTTON "&Ignore", 5, 208, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 820 PUSHBUTTON "&Yes", 6, 256, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 821 PUSHBUTTON "&No", 7, 304, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP 822 END 823 808 824 809 825 ///////////////////////////////////////////////////////////////////////////// -
TabularUnified tags/trunk/src/user32/new/win32wbase.cpp ¶
r12993 r12998 1 /* $Id: win32wbase.cpp,v 1.3 4 2000-01-11 17:34:43 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.35 2000-01-12 12:40:47 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1023 1023 } 1024 1024 //****************************************************************************** 1025 //TODO: Depending on menu type, we should send WM_INITMENU or WM_INITPOPUPMENU1026 //TODO: PM sends it for each submenu that gets activated; Windows only for the first1027 // submenu; once the menu bar is active, moving the cursor doesn't generate other1028 // WM_INITMENU msgs. Not really a problem, but might need to fix this later on.1029 //******************************************************************************1030 ULONG Win32BaseWindow::MsgInitMenu(MSG *msg)1031 {1032 return SendInternalMessageA(msg->message, msg->wParam, msg->lParam);1033 }1034 //******************************************************************************1035 1025 //****************************************************************************** 1036 1026 ULONG Win32BaseWindow::MsgNCPaint() … … 1061 1051 1062 1052 return rc; 1063 } else return 0; 1053 } 1054 else return 0; 1064 1055 } 1065 1056 //****************************************************************************** … … 1100 1091 SendInternalMessageA(WM_GETTEXT, wndNameLength, (LPARAM)windowNameA); 1101 1092 return windowNameA; 1102 }1103 //******************************************************************************1104 //******************************************************************************1105 ULONG Win32BaseWindow::MsgContextMenu(ULONG x,ULONG y)1106 {1107 return SendInternalMessageA(WM_CONTEXTMENU,Win32Hwnd,MAKELPARAM(x,y));1108 1093 } 1109 1094 //****************************************************************************** -
TabularUnified tags/trunk/src/user32/new/win32wbase.h ¶
r12993 r12998 1 /* $Id: win32wbase.h,v 1.2 4 2000-01-11 17:34:44 cbratschiExp $ */1 /* $Id: win32wbase.h,v 1.25 2000-01-12 12:40:49 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 115 115 ULONG MsgPaint(ULONG tmp1, BOOL select = TRUE); 116 116 ULONG MsgEraseBackGround(HDC hdc); 117 ULONG MsgInitMenu(MSG *msg);118 117 ULONG MsgHitTest(ULONG x, ULONG y); 119 118 ULONG MsgNCPaint(); … … 125 124 ULONG MsgGetTextLength(); 126 125 char *MsgGetText(); 127 ULONG MsgContextMenu(ULONG x,ULONG y);128 126 VOID updateWindowStyle(DWORD oldExStyle,DWORD oldStyle); 129 127
Note:
See TracChangeset
for help on using the changeset viewer.