- Timestamp:
- Nov 14, 1999, 1:00:01 PM (26 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/oslibmenu.cpp
r1513 r1732 1 /* $Id: oslibmenu.cpp,v 1. 4 1999-10-30 09:19:44sandervl Exp $ */1 /* $Id: oslibmenu.cpp,v 1.5 1999-11-14 12:00:01 sandervl Exp $ */ 2 2 /* 3 3 * Window Menu wrapper functions for OS/2 … … 79 79 } 80 80 //****************************************************************************** 81 //Returns menu item rectange in screen coordinates 82 //****************************************************************************** 83 BOOL OSLibGetMenuItemRect(HWND hMenu, int index, LPRECT pRect) 84 { 85 RECTL rectl; 86 BOOL rc; 87 ULONG id; 88 89 //First get id from menu index 90 id = (ULONG)WinSendMsg(hMenu, MM_ITEMIDFROMPOSITION, MPARAM(index), 0); 91 92 rc = (BOOL)WinSendMsg(hMenu, MM_QUERYITEMRECT, MPARAM(id), (MPARAM)&rectl); 93 if(rc == FALSE) { 94 dprintf(("OSLibGetMenuItemRect %x %d %d failed!", hMenu, index, id)); 95 return FALSE; 96 } 97 WinMapWindowPoints(hMenu, HWND_DESKTOP, (PPOINTL)&rectl, 2); 98 pRect->left = rectl.xLeft; 99 pRect->right = rectl.xRight; 100 pRect->top = OSLibQueryScreenHeight() - rectl.yTop; 101 pRect->bottom= OSLibQueryScreenHeight() - rectl.yBottom; 102 return TRUE; 103 } 104 //****************************************************************************** 81 105 //****************************************************************************** 82 106 -
trunk/src/user32/oslibmenu.h
r1446 r1732 1 /* $Id: oslibmenu.h,v 1. 3 1999-10-25 20:17:18sandervl Exp $ */1 /* $Id: oslibmenu.h,v 1.4 1999-11-14 12:00:01 sandervl Exp $ */ 2 2 /* 3 3 * Window Menu wrapper functions for OS/2 … … 22 22 HMENU OSLibWinCreateEmptyPopupMenu(); 23 23 int OSLibGetMenuItemCount(HWND hMenu); 24 BOOL OSLibGetMenuItemRect(HWND hMenu, int index, LPRECT pRect); 24 25 25 26 #endif //__OSLIBGDI_H__ -
trunk/src/user32/window.cpp
r1704 r1732 1 /* $Id: window.cpp,v 1.3 4 1999-11-11 13:17:32sandervl Exp $ */1 /* $Id: window.cpp,v 1.35 1999-11-14 12:00:01 sandervl Exp $ */ 2 2 /* 3 3 * Win32 window apis for OS/2 … … 1247 1247 HWND WIN32API WindowFromPoint( POINT point) 1248 1248 { 1249 HWND hwnd; 1250 1251 dprintf(("WindowFromPoint (%d,%d)\n", point.x, point.y)); 1252 hwnd = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&point); 1253 if(hwnd) { 1254 return Win32BaseWindow::OS2ToWin32Handle(hwnd); 1255 } 1256 return 0; 1249 HWND hwndOS2, hwnd; 1250 POINT wPoint; 1251 1252 1253 wPoint.x = point.x; 1254 wPoint.y = windowDesktop->getWindowHeight() - point.y; 1255 1256 hwndOS2 = OSLibWinWindowFromPoint(OSLIB_HWND_DESKTOP, (PVOID)&wPoint); 1257 if(hwndOS2) { 1258 hwnd = Win32BaseWindow::OS2ToWin32Handle(hwndOS2); 1259 if(hwnd) { 1260 dprintf(("WindowFromPoint (%d,%d) %x->%x\n", point.x, point.y, hwndOS2, hwnd)); 1261 return hwnd; 1262 } 1263 } 1264 dprintf(("WindowFromPoint (%d,%d) %x->1\n", point.x, point.y, hwndOS2)); 1265 return 1; 1257 1266 } 1258 1267 //****************************************************************************** -
trunk/src/user32/winmenu.cpp
r1675 r1732 1 /* $Id: winmenu.cpp,v 1.1 6 1999-11-09 20:15:11 sandervl Exp $ */1 /* $Id: winmenu.cpp,v 1.17 1999-11-14 12:00:01 sandervl Exp $ */ 2 2 3 3 /* … … 1073 1073 * extended error information, use the GetLastError function. 1074 1074 * Remark : 1075 * Status : UNTESTED STUB1075 * Status : 1076 1076 * 1077 1077 * Author : Patrick Haller [Thu, 1998/02/26 11:55] … … 1084 1084 LPRECT, lprcItem) 1085 1085 { 1086 dprintf(("USER32:GetMenuItemRect (%08xh,%08xh,%08xh,%08x) not implemented.\n", 1087 hWnd, 1088 hMenu, 1089 uItem, 1090 lprcItem)); 1091 1092 return (FALSE); 1086 return OSLibGetMenuItemRect(hMenu, uItem, lprcItem); 1093 1087 } 1094 1088 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.