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 Tech Support » ItemGetCmdID and Seperator Collapse All
Subject Author Date
Stephan Finkler Jan 7, 2005 - 2:21 AM

Return of ItemGetCmdID() is -1 not the expected value ID_SEPARATOR
when CmdID is a seperator.

int nReplacePos = pPopupWnd->ItemFindPosForCmdID(ID_CONTEXTMENU_BILD);
if( nReplacePos >= 0    && pPopupWnd->ItemGetCmdID(nReplacePos-1) == ID_SEPARATOR )    {    
VERIFY( pPopupWnd->ItemRemove(nReplacePos-1) );
}    // delete separator


Technical Support Jan 7, 2005 - 9:06 AM

Yes, it’s a bug, which is a result of the debugging process. In the ExtPopupMenuWnd.cpp file, please find this method

UINT CExtPopupMenuWnd::MENUITEMDATA::GetCmdID() const
and comment its first four lines
if(    IsSeparator()
        || IsInplaceEdit()
        )
        return ( (UINT) (IDC_STATIC) );