Changeset 5993 for trunk/src/user32
- Timestamp:
- Jun 13, 2001, 12:29:46 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/USER32.DEF
r5751 r5993 1 ; $Id: USER32.DEF,v 1.5 5 2001-05-19 11:16:01sandervl Exp $1 ; $Id: USER32.DEF,v 1.56 2001-06-13 10:29:44 sandervl Exp $ 2 2 3 3 LIBRARY USER32 INITINSTANCE TERMINSTANCE … … 693 693 _checkOrigin@4 @2029 NONAME 694 694 695 _SetWindowAppearance@4 @2030 NONAME -
trunk/src/user32/oslibwin.cpp
r5989 r5993 1 /* $Id: oslibwin.cpp,v 1. 99 2001-06-13 08:19:34 sandervl Exp $ */1 /* $Id: oslibwin.cpp,v 1.100 2001-06-13 10:29:44 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 123 123 if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) { 124 124 *OSFrameStyle = FCF_TITLEBAR; 125 if( dwStyle & WS_SYSMENU_W)125 if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W)) 126 126 { 127 127 *OSFrameStyle |= FCF_SYSMENU; … … 130 130 *OSFrameStyle |= FCF_MINMAX; 131 131 } 132 else 133 if(dwStyle & WS_SYSMENU_W) { 134 *OSFrameStyle |= FCF_CLOSEBUTTON; 135 } 132 136 } 133 137 } … … 136 140 //****************************************************************************** 137 141 //****************************************************************************** 138 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect) 142 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, 143 DWORD dwExStyle, HICON hSysMenuIcon) 139 144 { 140 145 SWP swp[3]; … … 149 154 } 150 155 156 #if 0 151 157 hwndControl = WinWindowFromID(hwndFrame, FID_SYSMENU); 152 158 if(hwndControl) { … … 165 171 i++; 166 172 } 167 hwndControl = WinWindowFromID(hwndFrame, FID_TITLEBAR); 168 if(hwndControl) { 169 swp[i].hwnd = hwndControl; 170 swp[i].hwndInsertBehind = HWND_TOP; 171 swp[i].x = pRect->xLeft; 172 swp[i].y = pRect->yBottom; 173 if(pRect->yTop - pRect->yBottom > minmaxheight) { 174 swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight; 173 #else 174 if((dwStyle & WS_SYSMENU_W) && !(dwExStyle & WS_EX_TOOLWINDOW_W) && hSysMenuIcon) { 175 pRect->xLeft += minmaxwidth/2; 176 } 177 #endif 178 if((dwStyle & WS_CAPTION_W) == WS_CAPTION_W) { 179 hwndControl = WinWindowFromID(hwndFrame, FID_TITLEBAR); 180 if(hwndControl) { 181 swp[i].hwnd = hwndControl; 182 swp[i].hwndInsertBehind = HWND_TOP; 183 swp[i].x = pRect->xLeft; 184 swp[i].y = pRect->yBottom; 185 if(pRect->yTop - pRect->yBottom > minmaxheight) { 186 swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight; 187 } 188 swp[i].cx = pRect->xRight - pRect->xLeft; 189 if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W)) { 190 swp[i].cx -= minmaxwidth; 191 } 192 if(dwStyle & WS_SYSMENU_W) { 193 swp[i].cx -= minmaxwidth/2; 194 } 195 swp[i].cy = minmaxheight; 196 swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW; 197 dprintf(("FID_TITLEBAR (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy)); 198 pRect->xLeft += swp[i].cx; 199 i++; 175 200 } 176 swp[i].cx = pRect->xRight - pRect->xLeft; 177 if(WinWindowFromID(hwndFrame, FID_MINMAX)) { 178 swp[i].cx -= (minmaxwidth + minmaxwidth/2); 201 } 202 if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W) || (dwStyle & WS_SYSMENU_W)) { 203 hwndControl = WinWindowFromID(hwndFrame, FID_MINMAX); 204 if(hwndControl) { 205 swp[i].hwnd = hwndControl; 206 swp[i].hwndInsertBehind = HWND_TOP; 207 swp[i].x = pRect->xLeft; 208 swp[i].y = pRect->yBottom; 209 if(pRect->yTop - pRect->yBottom > minmaxheight) { 210 swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight; 211 } 212 swp[i].cx = 0; 213 if((dwStyle & WS_MINIMIZEBOX_W) || (dwStyle & WS_MAXIMIZEBOX_W)) { 214 swp[i].cx += minmaxwidth; 215 } 216 if(dwStyle & WS_SYSMENU_W) { 217 swp[i].cx += minmaxwidth/2; 218 } 219 swp[i].cy = minmaxheight; 220 swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW; 221 dprintf(("FID_MINMAX (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy)); 222 pRect->xLeft += swp[i].cx; 223 i++; 179 224 } 180 swp[i].cy = minmaxheight;181 swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;182 dprintf(("FID_TITLEBAR (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));183 pRect->xLeft += swp[i].cx;184 i++;185 }186 hwndControl = WinWindowFromID(hwndFrame, FID_MINMAX);187 if(hwndControl) {188 swp[i].hwnd = hwndControl;189 swp[i].hwndInsertBehind = HWND_TOP;190 swp[i].x = pRect->xLeft;191 swp[i].y = pRect->yBottom;192 if(pRect->yTop - pRect->yBottom > minmaxheight) {193 swp[i].y += pRect->yTop - pRect->yBottom - minmaxheight;194 }195 swp[i].cx = minmaxwidth + minmaxwidth/2;196 swp[i].cy = minmaxheight;197 swp[i].fl = SWP_SIZE | SWP_MOVE | SWP_SHOW;198 dprintf(("FID_MINMAX (%d,%d)(%d,%d)", swp[i].x, swp[i].y, swp[i].cx, swp[i].cy));199 pRect->xLeft += swp[i].cx;200 i++;201 225 } 202 226 return WinSetMultWindowPos(GetThreadHAB(), swp, i); -
trunk/src/user32/oslibwin.h
r5951 r5993 1 /* $Id: oslibwin.h,v 1.5 6 2001-06-10 12:05:39sandervl Exp $ */1 /* $Id: oslibwin.h,v 1.57 2001-06-13 10:29:44 sandervl Exp $ */ 2 2 /* 3 3 * Window API wrappers for OS/2 … … 47 47 DWORD OSLibQueryWindowStyle(HWND hwnd); 48 48 49 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect );49 BOOL OSLibWinPositionFrameControls(HWND hwndFrame, RECTLOS2 *pRect, DWORD dwStyle, DWORD dwExStyle, HICON hSysMenuIcon); 50 50 51 51 #define OSLIB_QWL_USER -4 -
trunk/src/user32/pmwindow.cpp
r5951 r5993 1 /* $Id: pmwindow.cpp,v 1.13 4 2001-06-10 12:05:39sandervl Exp $ */1 /* $Id: pmwindow.cpp,v 1.135 2001-06-13 10:29:45 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Managment Code for OS/2 … … 157 157 return TRUE; 158 158 } /* End of main */ 159 //****************************************************************************** 160 //menu.cpp 161 BOOL MENU_Init(); 162 //****************************************************************************** 163 void WIN32API SetWindowAppearance(BOOL fLooks) 164 { 165 if(fLooks) { 166 SYSCOLOR_Init(FALSE); //use OS/2 colors 167 } 168 fOS2Look = fLooks; 169 MENU_Init(); 170 } 159 171 //****************************************************************************** 160 172 //Win32 window message handler -
trunk/src/user32/user32.cpp
r5973 r5993 1 /* $Id: user32.cpp,v 1.10 0 2001-06-12 17:02:36sandervl Exp $ */1 /* $Id: user32.cpp,v 1.101 2001-06-13 10:29:45 sandervl Exp $ */ 2 2 3 3 /* … … 633 633 *(BOOL *)pvParam = FALSE; //CB: where is the Warp 4 setting stored? 634 634 break; 635 635 636 case SPI_GETNONCLIENTMETRICS: 636 637 { 637 638 LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam; 638 639 639 if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))640 if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA)) 640 641 { 641 642 memset(lpnm, 0, sizeof(NONCLIENTMETRICSA)); … … 652 653 653 654 LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont); 654 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif", 655 lpLogFont->lfFaceName, LF_FACESIZE); 656 657 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13); 658 lpLogFont->lfWidth = 0; 659 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; 660 lpLogFont->lfWeight = FW_NORMAL; 655 if(fOS2Look) { 656 GetProfileStringA("Desktop", "MenuFont", "WarpSans", 657 lpLogFont->lfFaceName, LF_FACESIZE); 658 lpLogFont->lfWeight = FW_BOLD; 659 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 16); 660 lpLogFont->lfWidth = 0; 661 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; 662 } 663 else { 664 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif", 665 lpLogFont->lfFaceName, LF_FACESIZE); 666 lpLogFont->lfWeight = FW_NORMAL; 667 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13); 668 lpLogFont->lfWidth = 0; 669 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; 670 } 661 671 lpLogFont->lfItalic = FALSE; 662 672 lpLogFont->lfStrikeOut = FALSE; … … 677 687 lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENU); 678 688 lpnm->iMenuWidth = lpnm->iMenuHeight; //TODO 679 }689 } 680 690 else 681 {691 { 682 692 dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA))); 683 693 /* FIXME: SetLastError? */ -
trunk/src/user32/win32wbase.cpp
r5973 r5993 1 /* $Id: win32wbase.cpp,v 1.26 5 2001-06-12 17:02:41sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.266 2001-06-13 10:29:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1239 1239 rectOS2.yBottom = height - rect.top; 1240 1240 rectOS2.yTop = height - rect.bottom; 1241 OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2 );1241 OSLibWinPositionFrameControls(getOS2FrameWindowHandle(), &rectOS2, dwStyle, dwExStyle, IconForWindow(ICON_SMALL)); 1242 1242 } 1243 1243 return rc; -
trunk/src/user32/win32wbasenonclient.cpp
r5973 r5993 1 /* $Id: win32wbasenonclient.cpp,v 1.3 3 2001-06-12 17:02:42sandervl Exp $ */1 /* $Id: win32wbasenonclient.cpp,v 1.34 2001-06-13 10:29:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 (non-client methods) … … 888 888 HBITMAP memBmp,oldBmp; 889 889 890 if(fOS2Look) return; 890 if(fOS2Look) { 891 if ((dwStyle & WS_SYSMENU) && !(dwExStyle & WS_EX_TOOLWINDOW)) 892 { 893 int size = GetSystemMetrics(SM_CYCAPTION); 894 895 r2 = r; 896 r2.right = r2.left + size; 897 r2.bottom = r2.top + size; 898 FillRect(hdc, &r2, GetSysColorBrush(COLOR_MENU)); 899 900 DrawSysButton(hdc,&r); 901 } 902 return; 903 } 891 904 892 905 memDC = CreateCompatibleDC(hdc);
Note:
See TracChangeset
for help on using the changeset viewer.