Changeset 20119
- Timestamp:
- Jan 1, 2003, 3:29:45 PM (22 years ago)
- Location:
- tags/trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/user32/oslibwin.cpp ¶
r20107 r20119 1 /* $Id: oslibwin.cpp,v 1.13 1 2002-12-29 17:17:16sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.132 2003-01-01 14:29:42 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 117 117 //Note: Also check OSLibSetWindowStyle when changing this!! 118 118 //****************************************************************************** 119 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle) 119 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, 120 ULONG *OSFrameStyle) 120 121 { 121 122 *OSWinStyle = 0; … … 135 136 if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) { 136 137 *OSFrameStyle = FCF_TITLEBAR; 138 137 139 if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W)) 138 140 { … … 155 157 //****************************************************************************** 156 158 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, 157 DWORD dwExStyle, HICON hSysMenuIcon, BOOL drawCloseButton) 159 DWORD dwExStyle, HICON hSysMenuIcon, 160 BOOL drawCloseButton, BOOL fClassIcon) 158 161 { 159 162 SWP swp[3]; … … 171 174 172 175 if(fOS2Look == OS2_APPEARANCE_SYSMENU) { 176 //Note: If no class icon *and* WS_EX_DLGMODALFRAME -> no system menu!! 177 // --> TODO 173 178 hwndControl = WinWindowFromID(hwndFrame, FID_SYSMENU); 174 179 if(hwndControl) { … … 187 192 i++; 188 193 } 189 190 194 } 191 195 else 192 if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W) && hSysMenuIcon) { 196 //Note: If no class icon *and* WS_EX_DLGMODALFRAME -> no system menu!! 197 if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W) && 198 !(!fClassIcon && (dwExStyle & WS_EX_DLGMODALFRAME_W)) && hSysMenuIcon) 199 { 193 200 pRect->xLeft += minmaxwidth/2; 194 201 } … … 988 995 //****************************************************************************** 989 996 //****************************************************************************** 990 void OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle, ULONG dwExStyle) 997 void OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle, 998 ULONG dwExStyle) 991 999 { 992 1000 ULONG dwWinStyle; … … 1095 1103 } // os2look 1096 1104 } 1097 1098 1105 //****************************************************************************** 1099 1106 //****************************************************************************** -
TabularUnified tags/trunk/src/user32/oslibwin.h ¶
r19889 r20119 1 /* $Id: oslibwin.h,v 1. 69 2002-10-15 09:18:10sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.70 2003-01-01 14:29:43 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 44 44 int classStyle, HWND *hwndFrame); 45 45 46 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, ULONG *OSFrameStyle); 47 void OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle, ULONG dwExStyle); 46 BOOL OSLibWinConvertStyle(ULONG dwStyle, ULONG dwExStyle, ULONG *OSWinStyle, 47 ULONG *OSFrameStyle); 48 void OSLibSetWindowStyle(HWND hwndFrame, HWND hwndClient, ULONG dwStyle, 49 ULONG dwExStyle); 50 48 51 DWORD OSLibQueryWindowStyle(HWND hwnd); 49 52 50 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, DWORD dwExStyle, HICON hSysMenuIcon, BOOL drawCloseButton); 53 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, 54 DWORD dwExStyle, HICON hSysMenuIcon, 55 BOOL drawCloseButton, BOOL fClassIcon); 51 56 BOOL OSLibChangeCloseButtonState(HWND hwndFrame, BOOL State); 52 57 -
TabularUnified tags/trunk/src/user32/win32wbase.cpp ¶
r20116 r20119 1 /* $Id: win32wbase.cpp,v 1.34 8 2002-12-31 16:52:00sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.349 2003-01-01 14:29:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1374 1374 OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2, 1375 1375 dwStyle, dwExStyle, IconForWindow(ICON_SMALL), 1376 fCloseButton );1376 fCloseButton, windowClass->getIcon() != NULL); 1377 1377 } 1378 1378 return rc; … … 3712 3712 setStyle(ss.styleNew); 3713 3713 SendMessageA(getWindowHandle(),WM_STYLECHANGED,GWL_STYLE,(LPARAM)&ss); 3714 OSLibSetWindowStyle(getOS2FrameWindowHandle(), getOS2WindowHandle(), getStyle(), getExStyle()); 3714 OSLibSetWindowStyle(getOS2FrameWindowHandle(), getOS2WindowHandle(), 3715 getStyle(), getExStyle()); 3715 3716 3716 3717 //TODO: Might not be correct to use ShowWindow here -
TabularUnified tags/trunk/src/user32/win32wbasenonclient.cpp ¶
r20107 r20119 1 /* $Id: win32wbasenonclient.cpp,v 1.4 5 2002-12-29 17:17:16sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.46 2003-01-01 14:29:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 907 907 908 908 if(fOS2Look) { 909 if ((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW) && 910 fOS2Look != OS2_APPEARANCE_SYSMENU) 909 //Note: If no class icon *and* WS_EX_DLGMODALFRAME -> no system menu 910 if((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW) && 911 !(!windowClass->getIcon() && (dwExStyle & WS_EX_DLGMODALFRAME)) && 912 fOS2Look != OS2_APPEARANCE_SYSMENU) 911 913 { 912 914 HICON hSysIcon = IconForWindow(ICON_SMALL); … … 986 988 } 987 989 988 if ((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW)) 990 //Note: If no class icon *and* WS_EX_DLGMODALFRAME -> no system menu 991 if((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW) && 992 !(!windowClass->getIcon() && (dwExStyle & WS_EX_DLGMODALFRAME))) 989 993 { 990 994 if (DrawSysButton(memDC,&r)) … … 1550 1554 return DrawCaptionTemp(hwnd,hdc,rect,hFont,hIcon,(LPWSTR)str,uFlags,TRUE); 1551 1555 } 1552 1556 #if 0 1557 //Control helpers 1558 /*********************************************************************** 1559 * NC_GetSysPopupPos 1560 */ 1561 void NC_GetSysPopupPos( HWND hwnd, RECT* rect ) 1562 { 1563 if (IsIconic(hwnd)) GetWindowRect( hwnd, rect ); 1564 else 1565 { 1566 #ifdef __WIN32OS2__ 1567 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1568 if (!win32wnd) return; 1569 1570 win32wnd->GetSysPopupPos(rect); 1571 1572 RELEASE_WNDOBJ(win32wnd); 1573 #else 1574 WND *wndPtr = WIN_FindWndPtr( hwnd ); 1575 if (!wndPtr) return; 1576 1577 NC_GetInsideRect( hwnd, rect ); 1578 OffsetRect( rect, wndPtr->rectWindow.left, wndPtr->rectWindow.top); 1579 if (wndPtr->dwStyle & WS_CHILD) 1580 ClientToScreen( GetParent(hwnd), (POINT *)rect ); 1581 if (TWEAK_WineLook == WIN31_LOOK) { 1582 rect->right = rect->left + GetSystemMetrics(SM_CXSIZE); 1583 rect->bottom = rect->top + GetSystemMetrics(SM_CYSIZE); 1584 } 1585 else { 1586 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 1587 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 1588 } 1589 WIN_ReleaseWndPtr( wndPtr ); 1590 #endif 1591 } 1592 } 1593 //***************************************************************************** 1594 //***************************************************************************** 1595 BOOL NC_DrawSysButton95 (HWND hwnd, HDC hdc, BOOL down) 1596 { 1597 BOOL ret; 1598 1599 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 1600 if (!win32wnd) return FALSE; 1601 1602 ret = win32wnd->DrawSysButton(hwnd, hdc); 1603 1604 RELEASE_WNDOBJ(win32wnd); 1605 1606 return ret; 1607 } 1608 #endif
Note:
See TracChangeset
for help on using the changeset viewer.