Changeset 2396 for trunk/src/user32/new/win32wbase.cpp
- Timestamp:
- Jan 10, 2000, 6:18:13 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/new/win32wbase.cpp
r2390 r2396 1 /* $Id: win32wbase.cpp,v 1.2 7 2000-01-09 17:13:39 cbratschi Exp $ */1 /* $Id: win32wbase.cpp,v 1.28 2000-01-10 17:18:09 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 32 32 #include "oslibgdi.h" 33 33 #include "oslibres.h" 34 #include "oslibmenu.h"35 34 #include "oslibdos.h" 36 35 #include "syscolor.h" … … 45 44 #include <win\hook.h> 46 45 #include <shellapi.h> 46 #include <menu.h> 47 47 #define INCL_TIMERWIN32 48 48 #include "timer.h" … … 81 81 !(style & (WS_CHILD | WS_POPUP)) 82 82 83 #define HAS_MENU( w) (!((w)->getStyle() & WS_CHILD) && ((w)->getWindowId() != 0))83 #define HAS_MENU() (!(getStyle() & WS_CHILD) && (GetMenu() != 0)) 84 84 85 85 /* bits in the dwKeyData */ … … 674 674 if ((dwStyle & (WS_CAPTION | WS_CHILD)) == WS_CAPTION ) 675 675 { 676 #if 0 //CB: todo677 676 if (cs->hMenu) { 678 677 SetMenu(cs->hMenu); … … 684 683 } 685 684 } 686 #endif687 685 } 688 686 else … … 690 688 setWindowId((DWORD)cs->hMenu); 691 689 } 690 hSysMenu = (dwStyle & WS_SYSMENU) ? MENU_GetSysMenu(Win32Hwnd,0):0; 692 691 693 692 // Subclass frame … … 1257 1256 return; 1258 1257 /* Check if the sysmenu item for minimize is there */ 1259 #if 0 //CB: todo1260 1258 state = GetMenuState(hSysMenu,SC_MINIMIZE,MF_BYCOMMAND); 1261 #endif1262 1259 } else 1263 1260 { … … 1266 1263 return; 1267 1264 /* Check if the sysmenu item for maximize is there */ 1268 #if 0 //CB: todo1269 1265 state = GetMenuState(hSysMenu, SC_MAXIMIZE, MF_BYCOMMAND); 1270 #endif1271 1266 } 1272 1267 SetCapture(Win32Hwnd); … … 1314 1309 UINT state; 1315 1310 1316 #if 0 //CB: todo1317 1311 if (hSysMenu == 0) 1318 1312 return; 1319 1313 state = GetMenuState(hSysMenu, SC_CLOSE, MF_BYCOMMAND); 1320 #else1321 state = 0;1322 #endif1323 1314 /* If the item close of the sysmenu is disabled or not there do nothing */ 1324 1315 if((state & MF_DISABLED) || (state & MF_GRAYED) || (state == 0xFFFFFFFF)) … … 1532 1523 if(!(dwStyle & WS_MINIMIZE)) 1533 1524 { 1534 AdjustRectOuter(&tmpRect,FALSE); //CB: todo: menu1525 AdjustRectOuter(&tmpRect,FALSE); 1535 1526 1536 1527 clientRect->left -= tmpRect.left; … … 1539 1530 clientRect->bottom -= tmpRect.bottom; 1540 1531 1541 if (HAS_MENU(this)) 1542 { 1543 #if 0 //CB: todo 1544 winRect->top += 1532 if (HAS_MENU()) 1533 { 1534 clientRect->top += 1545 1535 MENU_GetMenuBarHeight(Win32Hwnd, 1546 1536 winRect->right - winRect->left, 1547 1537 -tmpRect.left, -tmpRect.top ) + 1; 1548 #endif1549 1538 } 1550 1539 … … 1693 1682 /* Check menu bar */ 1694 1683 1695 if (HAS_MENU( this))1684 if (HAS_MENU()) 1696 1685 { 1697 1686 if ((pt.y < 0) && (pt.x >= 0) && (pt.x < rect.right)) … … 1795 1784 1796 1785 return (hIcon != 0); 1786 } 1787 return FALSE; 1788 } 1789 //****************************************************************************** 1790 //****************************************************************************** 1791 BOOL Win32BaseWindow::GetSysPopupPos(RECT* rect) 1792 { 1793 if(hSysMenu) 1794 { 1795 if(dwStyle & WS_MINIMIZE ) 1796 *rect = rectWindow; 1797 else 1798 { 1799 GetInsideRect(rect ); 1800 OffsetRect( rect, rectWindow.left, rectWindow.top); 1801 if ((dwStyle & WS_CHILD) && getParent()) 1802 ClientToScreen(getParent()->getWindowHandle(), (POINT *)rect ); 1803 rect->right = rect->left + GetSystemMetrics(SM_CYCAPTION) - 1; 1804 rect->bottom = rect->top + GetSystemMetrics(SM_CYCAPTION) - 1; 1805 } 1806 return TRUE; 1797 1807 } 1798 1808 return FALSE; … … 1938 1948 char buffer[256]; 1939 1949 HPEN hPrevPen; 1940 HMENU hSysMenu;1941 1950 1942 1951 if (flags & WIN_MANAGED) return; … … 1947 1956 SelectObject( hdc, hPrevPen ); 1948 1957 r.bottom--; 1949 1950 //CB: todo:1951 //COLOR_GRADIENTACTIVECAPTION1952 //COLOR_GRADIENTINACTIVECAPTION1953 //-> end color1954 1958 1955 1959 if (SYSCOLOR_GetUseWinColors()) … … 2006 2010 { 2007 2011 UINT state; 2008 #if 0 //CB: todo 2012 2009 2013 /* Go get the sysmenu */ 2010 2014 state = GetMenuState(hSysMenu, SC_CLOSE, MF_BYCOMMAND); 2011 #else 2012 state = 0; 2013 #endif 2015 2014 2016 /* Draw a grayed close button if disabled and a normal one if SC_CLOSE is not there */ 2015 2017 DrawCloseButton(hdc, FALSE, … … 2115 2117 } 2116 2118 } 2117 #if 0 //CB: todo 2118 if (HAS_MENU(wndPtr)) 2119 if (HAS_MENU()) 2119 2120 { 2120 2121 RECT r = rect; 2121 2122 r.bottom = rect.top + GetSystemMetrics(SM_CYMENU); 2122 2123 2123 rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; 2124 } 2125 #endif 2124 rect.top += MENU_DrawMenuBar( hdc, &r, Win32Hwnd, suppress_menupaint ) + 1; 2125 } 2126 2126 2127 2127 if (dwExStyle & WS_EX_CLIENTEDGE) … … 2319 2319 TrackScrollBar(wParam,*pt32); 2320 2320 break; 2321 #if 0 2321 2322 2322 case SC_MOUSEMENU: 2323 MENU_TrackMouseMenuBar( wndPtr, wParam & 0x000F, pt32);2323 MENU_TrackMouseMenuBar(Win32Hwnd,wParam & 0x000F,*pt32); 2324 2324 break; 2325 2325 2326 2326 case SC_KEYMENU: 2327 MENU_TrackKbdMenuBar( wndPtr , wParam , pt.x);2327 MENU_TrackKbdMenuBar(Win32Hwnd,wParam,pt32->x); 2328 2328 break; 2329 #endif 2329 2330 2330 case SC_TASKLIST: 2331 2331 WinExec("taskman.exe",SW_SHOWNORMAL); … … 2573 2573 switch(LOWORD(lParam)) 2574 2574 { 2575 case HTCLIENT: 2576 hCursor = windowClass ? windowClass->getCursor():LoadCursorA(0,IDC_ARROWA); 2577 break; 2578 2575 2579 case HTLEFT: 2576 2580 case HTRIGHT: … … 2594 2598 2595 2599 default: 2596 hCursor = windowClass ? windowClass->getCursor():LoadCursorA(0,IDC_ARROWA);2600 hCursor = LoadCursorA(0,IDC_ARROWA); 2597 2601 break; 2598 2602 } … … 2769 2773 2770 2774 case WM_CANCELMODE: 2771 //if (getParent() == windowDesktop) EndMenu();2775 if (getParent() == windowDesktop) EndMenu(); 2772 2776 if (GetCapture() == Win32Hwnd) ReleaseCapture(); 2773 2777 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.