Board index » Visual Studio » How do I close up a menu? Wince 4.2

How do I close up a menu? Wince 4.2

Visual Studio18
Following on from a previous thread... my app is doc / view

architecture (and I think I can get a pointer to the menu with a

framework call to GetMenu() )



If the menu has been dropped down but nothing selected from it, is

there a way that the program can close it up again?



Thanks.


-
 

Re:How do I close up a menu? Wince 4.2

Quote
If the menu has been dropped down but nothing selected from it, is

there a way that the program can close it up again?



Try posting a WM_CANCELMODE message to the parent window of the menu.



Dave

-

Re:How do I close up a menu? Wince 4.2

If the parent is the class receiving menu selections - a CFrameWnd in

this case, then PostMessage ( theApp.m_pFrame->m_hWnd , WM_CANCELMODE ,

0 , 0) doesn't do it. :-(



-

Re:How do I close up a menu? Wince 4.2

Quote
If the parent is the class receiving menu selections - a CFrameWnd in

this case, then PostMessage ( theApp.m_pFrame->m_hWnd , WM_CANCELMODE ,

0 , 0) doesn't do it. :-(



Have a look at the EndMenu Function documentation. I don't know if

it's supported on CE platforms though.



Dave

-