I am trying to put some "help text" in a status bar window.
I am using a top level menu; each top level item has a POPUP menu associated with it.
Currently, I intercept the WM_MENUSELECT message, with this code:
As noted in the comments, this works fine as long as the user has "selected" a menu, and the associated popup menu has been displayed; and when the user actually selects an item from the popup, I get the correct text as well by intercepting WM_COMMAND.
But...
I am trying to get text to display when the user just passes the mouse over the top-level menu item, when Windows makes the item "currently under the mouse" appear to be in a 'raised' button. That is, be able to change the help text even though the user has not yet 'selected' a menu item.
I have looked through MSDN and the Win32 kit, and can't seem to find a message to intercept which says, "the cursor is currently over a top-level menu item."
Can anyone point me in the correct direction?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
I am using a top level menu; each top level item has a POPUP menu associated with it.
Currently, I intercept the WM_MENUSELECT message, with this code:
Code:
CASE %WM_MENUSELECT LOCAL szsText AS ASCIIZ * 60 ' see if browsing a top-level menu ' this works, but does not show anything unless the user is currently browsing a menu IF lParam = getMenu(hwnd) THEN 'it's a top level menu SELECT CASE LOWRD(wParam) CASE %IDM_INDEX_FILE szsText = "File and Database Commands" CASE %IDM_INDEX_OPTIONS szsText = "Output Options" CASE %IDM_INDEX_REPORTS szsText = "Reports and Queries" CASE %IDM_INDEX_HELP szsText = "Help and 'About' information" END SELECT ELSE ' this works good for the items in the popups LoadString GetWindowLong(hWnd, %GWL_HINSTANCE), wParam, szsText, SIZEOF(szsText) END IF SendMessage hStatus, %WM_SETTEXT, 0, VARPTR(szsText) FUNCTION = 0 EXIT FUNCTION
But...
I am trying to get text to display when the user just passes the mouse over the top-level menu item, when Windows makes the item "currently under the mouse" appear to be in a 'raised' button. That is, be able to change the help text even though the user has not yet 'selected' a menu item.
I have looked through MSDN and the Win32 kit, and can't seem to find a message to intercept which says, "the cursor is currently over a top-level menu item."
Can anyone point me in the correct direction?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Comment