Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Why TrackPopupMenu does not return the identifier of the menu ... Collapse All
Subject Author Date
Buba Jun 17, 2002 - 7:16 AM

TPM_RETURNCMD - unsupported
:((

Sergiy Lavrynenko Jun 18, 2002 - 12:00 PM

Thank you, that is a really good question.
I will include this feature to my TO-DO list.
This should not be hard to implement because
menu already supports its internal message
loop. All we need to do: just return the
selection ID.

Buba Jun 19, 2002 - 12:38 AM

I think incorrect such call:

BOOL CExtPopupMenuWnd::TrackPopupMenu
{
...
    _UpdateCmdUI(); // !?
...
}
Because, if I want to call the contextual menu with the resolved or forbidden items, that this call all to me spoil: (. I think that this call needs to be removed for limits TrackPopupMenu. For example a call of the submenu from the menu it should be approximately so

void CExtBarButton::OnTrackPopup
{
...
    pPopup->g_hWndCmdReciever = GetCmdTargetWnd()->GetSafeHwnd();
    pPopup->_UpdateCmdUI();
    pPopup->TrackPopupMenu(
...
}

Then it will be correct to work both the contextual menu and the submenu in the menu and it more corresponds to call WinAPI::TrackPopupMenu

Excuse me if I that has confused :)