Home > Software engineering >  Duilib menu, if the mouse without the menu, the mouse to click other places, the menu will not shut
Duilib menu, if the mouse without the menu, the mouse to click other places, the menu will not shut

Time:04-23

As title, increased the duilib menu, the menu display, if the mouse didn't go to menu, click other places, the menu will not close;
But after the menu display, the mouse through the menu (no other operations), click elsewhere, menu close;
Menu is closed CMenuWnd receives the WM_LBUTTONDOWN message, if the operator is not itself, is closing the menu;
The above issue tracking and found that if the mouse over the menu, will receive the WM_LBUTTONDOWN message, otherwise there won't be WM_LBUTTONDOWN message, really don't know the reason, masters teach you;

CodePudding user response:

Try to call before the popup menu SetForegroundWindow

CodePudding user response:

There is another, loses focus off the menu,
  • Related