- Timestamp:
- Jan 21, 2000, 2:30:35 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibwin.cpp
r2483 r2489 1 /* $Id: oslibwin.cpp,v 1.6 2 2000-01-20 16:48:55 cbratschiExp $ */1 /* $Id: oslibwin.cpp,v 1.63 2000-01-21 13:30:34 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 613 613 point.y = y; 614 614 615 if 615 if(hParent) 616 616 { 617 RECTL parentRect; 618 619 WinQueryWindowRect(hParent,&parentRect); 620 point.y = parentRect.yTop-point.y-cy; 621 } else point.y = ScreenHeight-point.y-cy; 617 WinMapWindowPoints(hParent, HWND_DESKTOP, &point, 1); 618 } 619 point.y = ScreenHeight-point.y-cy; 622 620 623 621 x = point.x; -
trunk/src/user32/pmwindow.cpp
r2486 r2489 1 /* $Id: pmwindow.cpp,v 1.8 0 2000-01-20 21:45:07sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.81 2000-01-21 13:30:34 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 287 287 288 288 case WM_CALCVALIDRECTS: 289 #if 1 290 { 291 PRECTL oldRect = (PRECTL)mp1,newRect = oldRect+1; 292 UINT res = CVR_ALIGNLEFT | CVR_ALIGNTOP; 293 294 //CB: todo: use WM_NCCALCSIZE result 295 if (win32wnd->getWindowClass()) 296 { 297 DWORD dwStyle = win32wnd->getWindowClass()->getClassLongA(GCL_STYLE_W); 298 299 if ((dwStyle & CS_HREDRAW_W) && (newRect->xRight-newRect->xLeft != oldRect->xRight-oldRect->xLeft)) 300 res |= CVR_REDRAW; 301 else if ((dwStyle & CS_VREDRAW_W) && (newRect->yTop-newRect->yBottom != oldRect->yTop-oldRect->yBottom)) 302 res |= CVR_REDRAW; 303 } else res |= CVR_REDRAW; 304 305 RestoreOS2TIB(); 306 return (MRESULT)res; 307 } 308 #else 289 309 RestoreOS2TIB(); 290 310 return (MRESULT)(CVR_ALIGNLEFT | CVR_ALIGNTOP); 311 #endif 291 312 292 313 case WM_SETFOCUS: -
trunk/src/user32/win32wbase.cpp
r2483 r2489 1 /* $Id: win32wbase.cpp,v 1.14 3 2000-01-20 16:48:56 cbratschiExp $ */1 /* $Id: win32wbase.cpp,v 1.144 2000-01-21 13:30:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 105 105 OS2Hwnd = 0; 106 106 OS2HwndFrame = 0; 107 hMenu = 0;108 107 hSysMenu = 0; 109 108 Win32Hwnd = 0; … … 122 121 win32wndproc = 0; 123 122 hInstance = 0; 124 windowId = 0xFFFFFFFF; //default =-1123 dwIDMenu = 0; //0xFFFFFFFF; //default -1 125 124 userData = 0; 126 125 contextHelpId = 0; … … 1055 1054 //set new window rectangle 1056 1055 setWindowRect(lpWndPos->x, lpWndPos->y, lpWndPos->x + lpWndPos->cx, lpWndPos->y + lpWndPos->cy); 1057 if (getParent()) mapWin32Rect(getParent()->getOS2WindowHandle(),OSLIB_HWND_DESKTOP,&rectWindow);1058 1056 newWindowRect= rectWindow; 1059 1057 } … … 1414 1412 DWORD lParam; 1415 1413 1416 if (dwStyle & WS_CHILD) 1417 { 1418 lParam = MAKELONG(rectClient.left,rectClient.top); 1419 } else 1420 { 1421 POINT point; 1422 1423 point.x = rectClient.left; 1424 point.y = rectClient.top; 1425 if (getParent()) ClientToScreen(getParent()->getWindowHandle(),&point); 1426 1427 lParam = MAKELONG(point.x, point.y); 1428 } 1429 SendInternalMessageA(WM_MOVE, 0, lParam); 1414 if(getParent()) {//in parent coordinates 1415 POINT point; 1416 1417 point.x = rectClient.left; 1418 point.y = rectClient.top; 1419 MapWindowPoints(getWindowHandle(), getParent()->getWindowHandle(), &point, 1); 1420 1421 lParam = MAKELONG(point.x, point.y); 1422 } 1423 else {//in screen coordinates 1424 lParam = MAKELONG(rectWindow.left+rectClient.left, rectWindow.top+rectClient.top); 1425 } 1426 SendInternalMessageA(WM_MOVE, 0, lParam); 1430 1427 } 1431 1428 if (!(wpos->flags & SWP_NOSIZE) && !(wpos->flags & SWP_NOCLIENTSIZE)) … … 2722 2719 //****************************************************************************** 2723 2720 //****************************************************************************** 2724 VOID Win32BaseWindow::updateWindowStyle(DWORD oldExStyle,DWORD oldStyle)2725 {2726 if(IsWindowDestroyed()) return;2727 2728 if ((dwStyle & 0xFFFF0000) != (oldStyle & 0xFFFF0000))2729 {2730 FrameUpdateClient(this);2731 }2732 }2733 //******************************************************************************2734 //******************************************************************************2735 2721 LONG Win32BaseWindow::SetWindowLongA(int index, ULONG value, BOOL fUnicode) 2736 2722 { … … 2751 2737 SendInternalMessageA(WM_STYLECHANGING,GWL_EXSTYLE,(LPARAM)&ss); 2752 2738 setExStyle(ss.styleNew); 2753 updateWindowStyle(ss.styleOld,getStyle());2754 2739 SendInternalMessageA(WM_STYLECHANGED,GWL_EXSTYLE,(LPARAM)&ss); 2755 2740 return ss.styleOld; … … 2768 2753 SendInternalMessageA(WM_STYLECHANGING,GWL_STYLE,(LPARAM)&ss); 2769 2754 setStyle(ss.styleNew); 2770 updateWindowStyle(dwExStyle,ss.styleOld);2771 2755 SendInternalMessageA(WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss); 2772 2756 #ifdef DEBUG … … 2878 2862 void Win32BaseWindow::setWindowId(DWORD id) 2879 2863 { 2880 windowId = id; 2881 dprintf(("Set window ID to %x", id)); 2882 OSLibSetWindowID(OS2HwndFrame, id); 2864 dwIDMenu = id; 2883 2865 } 2884 2866 //****************************************************************************** -
trunk/src/user32/win32wbase.h
r2469 r2489 1 /* $Id: win32wbase.h,v 1.7 2 2000-01-18 20:08:17sandervl Exp $ */1 /* $Id: win32wbase.h,v 1.73 2000-01-21 13:30:35 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 157 157 WNDPROC getWindowProc() { return win32wndproc; }; 158 158 void setWindowProc(WNDPROC newproc) { win32wndproc = newproc; }; 159 DWORD getWindowId() { return windowId; };159 DWORD getWindowId() { return dwIDMenu; }; 160 160 void setWindowId(DWORD id); 161 161 ULONG getWindowHeight() { return rectWindow.bottom - rectWindow.top; }; … … 188 188 void setFlags(DWORD newflags) { flags = newflags; }; 189 189 190 HMENU GetMenu() { return hMenu; };191 VOID SetMenu(HMENU newMenu) { hMenu = newMenu; };190 HMENU GetMenu() { return dwIDMenu; }; 191 VOID SetMenu(HMENU newMenu) { dwIDMenu = newMenu; }; 192 192 void SetSysMenu(HMENU hSystemMenu) { hSysMenu = hSystemMenu; }; 193 193 HMENU GetSysMenu() { return hSysMenu; } … … 306 306 HWND OS2Hwnd; 307 307 HWND OS2HwndFrame; 308 HMENU hMenu;309 308 HMENU hSysMenu; 310 309 HWND Win32Hwnd; … … 320 319 //Moved in ChildWindow class 321 320 ///// Win32BaseWindow *parent; //GWL_HWNDPARENT 322 ULONG windowId; //GWL_ID321 ULONG dwIDMenu; //GWL_ID 323 322 ULONG userData; //GWL_USERDATA 324 323
Note:
See TracChangeset
for help on using the changeset viewer.