- Timestamp:
- Jan 4, 2003, 1:21:44 PM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/menu.c
r9605 r9607 1234 1234 if (lpitem->fState & MF_HILITE) 1235 1235 { 1236 #ifdef __WIN32OS2__ 1237 if(!fOS2Look) 1238 #else 1236 1239 if(TWEAK_WineLook == WIN98_LOOK) 1240 #endif 1237 1241 { 1238 1242 if(menuBar) 1239 1243 DrawEdge(hdc, &rect, BDR_SUNKENOUTER, BF_RECT); 1240 1244 else 1241 #if 0 //def __WIN32OS2__1242 if(!fOS2Look)1243 FillRect( hdc, &rect, GetOS2ColorBrush(PMSYSCLR_MENUHILITEBGND) );1244 else FillRect( hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT) );1245 #else1246 1245 FillRect(hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT)); 1247 #endif1248 1246 } 1249 1247 else /* Not Win98 Look */ … … 1304 1302 if (lpitem->fState & MF_HILITE) 1305 1303 { 1304 #ifdef __WIN32OS2__ 1305 if(!fOS2Look) 1306 #else 1306 1307 if(TWEAK_WineLook == WIN98_LOOK) 1308 #endif 1307 1309 { 1308 1310 if(menuBar) { … … 1314 1316 else 1315 1317 SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); 1316 #if 0 //def __WIN32OS2__1317 if(!fOS2Look)1318 SetBkColor(hdc, GetOS2Color(PMSYSCLR_MENUHILITEBGND));1319 else SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));1320 #else1321 1318 SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT)); 1322 #endif1323 1319 } 1324 1320 } -
trunk/src/user32/oslibmsgtranslate.cpp
r9598 r9607 1 /* $Id: oslibmsgtranslate.cpp,v 1.9 7 2003-01-03 16:35:54 sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.98 2003-01-04 12:21:44 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 646 646 #endif 647 647 648 #ifdef ALTGR_HACK649 650 651 if (usPMScanCode == PMSCAN_ALTRIGHT)652 {653 // Turn message into CTRL-event654 // The original PM message is still saved inside655 // the TEB, the next call to TranslateMessage()656 // will then generate the required additional message657 // for the ALTGR-event.658 winMsg->wParam = VK_LCONTROL_W;659 winMsg->lParam = repeatCount & 0x0FFFF;660 winMsg->lParam |= WINSCAN_CTRLLEFT << 16661 | WIN_KEY_DONTCARE;662 663 if (flags & KC_KEYUP)664 {665 winMsg->message = WINWM_SYSKEYUP;666 winMsg->lParam |= WIN_KEY_ALTHELD; // bit 29, alt was pressed667 winMsg->lParam |= WIN_KEY_PREVSTATE; // bit 30, previous state, always 1 for a WM_KEYUP message668 winMsg->lParam |= 1 << 31; // bit 31, transition state, always 1 for WM_KEYUP669 670 // Note: altgr affects the alt-key state in windows!671 // The overlay causes GetKeyState/GetAsyncKeyState to return672 // the correct states673 KeySetOverlayKeyState(VK_LCONTROL_W, KEYOVERLAYSTATE_DONTCARE);674 KeySetOverlayKeyState(VK_CONTROL_W, KEYOVERLAYSTATE_DONTCARE);675 }676 else677 {678 winMsg->lParam |= WIN_KEY_ALTHELD;679 if (keyWasPressed)680 winMsg->lParam |= WIN_KEY_PREVSTATE; // bit 30, previous state, 1 means key was pressed681 winMsg->message = WINWM_KEYDOWN;682 683 // Note: altgr affects the alt-key state in windows!684 // The overlay causes GetKeyState/GetAsyncKeyState to return685 // the correct states686 KeySetOverlayKeyState(VK_LCONTROL_W, KEYOVERLAYSTATE_DOWN);687 KeySetOverlayKeyState(VK_CONTROL_W, KEYOVERLAYSTATE_DOWN);688 KeySetOverlayKeyState(VK_RMENU_W, KEYOVERLAYSTATE_DOWN);689 KeySetOverlayKeyState(VK_MENU_W, KEYOVERLAYSTATE_DOWN);690 691 // Note: when CTRL comes up, windows keeps ALTGR still down!692 // KeySetOverlayKeyState(VK_RMENU_W, KEYOVERLAYSTATE_DOWN);693 }694 }695 #endif696 648 697 649 //@PF This looks ugly but this is just what we have in win32 both in win98/win2k … … 811 763 } 812 764 } 813 814 #ifdef ALTGR_HACK815 // it's a PMSCAN_ALTRIGHT WM_CHAR message?816 // and not previously translated?817 if(fMsgRemoved && usPMScanCode == PMSCAN_ALTRIGHT && !(teb->o.odin.fTranslated))818 {819 dprintf(("Queue ALTRIGHT message"));820 // special ALTRIGHT treatment:821 // we try to insert another WM_KEYDOWN or WM_KEYUP instead of822 // the usual WM_CHAR which is expected here.823 // -> experimental824 // it's really an OS/2-style WM_CHAR message?825 MSG extramsg;826 memcpy(&extramsg, winMsg, sizeof(MSG));827 828 // AltGr is not released with WINWM_SYSKEYUP, but WINWM_KEYUP829 if(flags & KC_KEYUP)830 {831 extramsg.message = WINWM_KEYUP;832 }833 extramsg.wParam = VK_RMENU_W;834 835 // mask out message bits and scan code836 extramsg.lParam &= (0xDC00FFFF);837 extramsg.lParam |= (WINSCAN_ALTRIGHT & 0x1FF) << 16;838 //// extramsg.lParam |= WIN_KEY_EXTENDED;839 if (!(flags & KC_KEYUP))840 extramsg.lParam |= WIN_KEY_ALTHELD;841 842 // insert message into the queue843 setThreadQueueExtraCharMessage(teb, &extramsg);844 }845 #endif846 765 break; 847 766 } -
trunk/src/user32/win32wbase.cpp
r9590 r9607 1 /* $Id: win32wbase.cpp,v 1.35 0 2003-01-02 17:02:05sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.351 2003-01-04 12:21:44 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 1891 1891 } 1892 1892 1893 case WM_KEYDOWN: 1894 if(wParam == VK_F10) iF10Key = VK_F10; 1895 break; 1896 1893 1897 case WM_SYSKEYDOWN: 1894 1898 { … … 1999 2003 if (((wParam == VK_MENU) && iMenuSysKey) || 2000 2004 ((wParam == VK_F10) && iF10Key)) 2001 ::SendMessageW( GetTop Window(), WM_SYSCOMMAND, SC_KEYMENU, 0L );2005 ::SendMessageW( GetTopParent(), WM_SYSCOMMAND, SC_KEYMENU, 0L ); 2002 2006 iMenuSysKey = iF10Key = 0; 2003 2007 break;
Note:
See TracChangeset
for help on using the changeset viewer.