How to popup the application-menu ?
-
I have a window with no non-client-area and some overriden parameters. i need to popup the application menu when my simulation caption is clicked... this does nothing:
SendMessage(WM_SYSCOMMAND, SC_MOUSEMENU+HTSYSMENU, MAKELPARAM(m_clientMenuPos.x, m_clientMenuPos.y));
The only way I can pop it up at the moment is :CMenu* sysMenu = GetSystemMenu(false); int cmd = sysMenu->TrackPopupMenuEx(TPM_RETURNCMD, m_clientMenuPos.x, m_clientMenuPos.y, this, 0); if (cmd) SendMessage(WM_SYSCOMMAND, cmd);
but this doesn't always bring the most updated menu. Also, my application-menu contains only 'Move' and 'Close', what window-styles or overriden return-values do I need to have in-order to get all the other options ? (Maximize, minimize, restore, etc) [my window has WM_MAXIMIZEBOX for example).