Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. win: can't trap WM_ENTER/EXITMENULOOP?
Qt 6.11 is out! See what's new in the release blog

win: can't trap WM_ENTER/EXITMENULOOP?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 210 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • davecotterD Offline
    davecotterD Offline
    davecotter
    wrote on last edited by davecotter
    #1

    in the documentation here, it indicates i can get a message when the menu bar starts to be browsed, and another when the browsing is completed.

    this is exactly what i need (the purpose is unrelated to this post).

    So in my QMainWindow derived class, i override the nativeEvent() method, like so:

    bool	QBrowserWindow::nativeEvent(
    	const QByteArray&	eventType,
    	void			*messageP,
    	qintptr			*resultP)
    {
    	bool		handledB(false);
    
    	if (eventType == kWindowsEventType_GENERIC) {
    		MSG&		msg(*(MSG *)messageP);
    
    		switch (msg.message) {
    
    			default: {
    				//	nothing else
    			} break;
    
    			case WM_ENTERMENULOOP: {
    				Log("start menu browsing");
    				SuspendTableUpdates(true);
    			} break;
    
    			case WM_EXITMENULOOP: {
    				Log("end menu browsing");
    				SuspendTableUpdates(false);
    			} break;
    		}
    	}
    
    	return handledB;
    }
    

    However, those messages are never sent :(

    Any idea why not?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved