tkho(a)ucla.edu wrote:
>+typedef struct {
>+ /* ----------- MENUITEMINFO Stuff ----------- */
>+ UINT fType; /* Item type. */
>+ UINT fState; /* Item state. */
>+ UINT_PTR wID; /* Item id. */
>+ HMENU hSubMenu; /* Pop-up menu. */
>+ HBITMAP hCheckBit; /* Bitmap when checked. */
>+ HBITMAP hUnCheckBit; /* Bitmap when unchecked. */
>+ LPWSTR text; /* Item text. */
>+ ULONG_PTR dwItemData; /* Application defined. */
>+ LPWSTR dwTypeData; /* depends on fMask */
>+ HBITMAP hbmpItem; /* bitmap */
>+ /* ----------- Wine stuff ----------- */
>+ RECT rect; /* Item area (relative to menu window) */
>+ UINT xTab; /* X position of text after Tab */
>+ SIZE bmpsize; /* size needed for the HBMMENU_CALLBACK
>+ * bitmap */
>+} MENUITEM;
>+
>+/* Popup menu structure */
>+typedef struct {
>+ WORD wFlags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
>+ WORD wMagic; /* Magic number */
>+ WORD Width; /* Width of the whole menu */
>+ WORD Height; /* Height of the whole menu */
>+ UINT nItems; /* Number of items in the menu */
>+ HWND hWnd; /* Window containing the menu */
>+ MENUITEM *items; /* Array of menu items */
>+ UINT FocusedItem; /* Currently focused item */
>+ HWND hwndOwner; /* window receiving the messages for ownerdraw */
>+ BOOL bTimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
>+ BOOL bScrolling; /* Scroll arrows are active */
>+ UINT nScrollPos; /* Current scroll position */
>+ UINT nTotalHeight; /* Total height of menu items inside menu */
>+ /* ------------ MENUINFO members ------ */
>+ DWORD dwStyle; /* Extended menu style */
>+ UINT cyMax; /* max height of the whole menu, 0 is screen height */
>+ HBRUSH hbrBack; /* brush for menu background */
>+ DWORD dwContextHelpID;
>+ DWORD dwMenuData; /* application defined value */
>+ HMENU hSysMenuOwner; /* Handle to the dummy sys menu holder */
>+ SIZE maxBmpSize; /* Maximum size of the bitmap items */
>+} POPUPMENU, *LPPOPUPMENU;
>
Hi Thomas,
This needs to be cleaned up a lot more before it will be accepted.
For a start, the members of this structure need to be cleaned up. Some
of the members of the POPUPMENU structure are for keeping track of the
menu while it's in use (bTimeToHide, bScrolling, nScrollPos,
FocusedItem), so these could be kept on the client side. Also,
everything needs to be converted to wineserver types.
It should become clear what needs to change as menu item handling is
moved into the server, so I would urge you to work on that and then
rework these patches.
Thanks,
--
Rob Shearman