15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Size of floating pop-up menu

Michael -- Michael.Dunphy@HBC.honeywell.com
Thursday, December 26, 1996

Environment: MSVC 4.2b Windows 95

Is there any way to determine the size of a floating pop-up menu?

[What I *really* want is to be able to detect when the user clicks
outside the menu, or presses the escape key, without having
to deduce that fact from the absence of a WM_COMMAND message.

Despite what the help for CWnd::OnMenuSelect says, I get a
WM_SELECTMENU message with a fuFlags parameter of 0xFFFF
and a NULL hmenu parameter regardless of whether the user clicked
on or off the menu].



Alexander Grigoriev -- alegr@aha.ru
Friday, December 27, 1996

Michael,

Try WM_ENTERMENULOOP, WM_EXITMENULOOP. Help for WM_MENUSELECT says:

If the fuFlags parameter contains 0xFFFF and the hmenu parameter contains
NULL, Windows has closed the menu. 

It does not matter whether the menu was canceled or not.

----------
> From: Dunphy, Michael 
> To: mfc-l@netcom.comReturn requestedReceipt notification requested
> Subject: Size of floating pop-up menu
> Date: 26 ДЕЛБВТС 1996 З. 21:43
> 
> Environment: MSVC 4.2b Windows 95
> 
> Is there any way to determine the size of a floating pop-up menu?
> 
> [What I *really* want is to be able to detect when the user clicks
> outside the menu, or presses the escape key, without having
> to deduce that fact from the absence of a WM_COMMAND message.
> 
> Despite what the help for CWnd::OnMenuSelect says, I get a
> WM_SELECTMENU message with a fuFlags parameter of 0xFFFF
> and a NULL hmenu parameter regardless of whether the user clicked
> on or off the menu].




| Вернуться в корень Архива |