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 » About PopupMenu Collapse All
Subject Author Date
tera t Nov 13, 2007 - 1:17 AM

Hello.

I want to install a checkmark or a Rad button in this PopupMenu
Please teach a way.

http://www.yukai.jp/~ifreeta/20071113/image01.jpg

Technical Support Nov 13, 2007 - 10:00 AM

It is not completely clear what you want to show us on this screenshot but we can say that the checked (radio) state of the menu items is based on MFC’s command updating mechanism.

So to check/uncheck a menu item, you should add a command updating method for the command associated with the menu item to your window that is the target of the popup menu commands. This method can be generated by the Visual Studio automatically.

Here is the method declaration:

    afx_msg void OnUpdateMyCmd(CCmdUI* pCmdUI);
Here is the message map entry:
    ON_UPDATE_COMMAND_UI(ID_MY_CMD, OnUpdateMyCmd)


Here is the method body:
 void CMainFrame::OnUpdateMyCmd(CCmdUI* pCmdUI) 
{
    pCmdUI->SetCheck( 1 ); // check
    or
    pCmdUI->SetCheck( 0 ); // uncheck
}

Technical Support Nov 13, 2007 - 9:57 AM

We are sorry but it is not completely unclear what you mean. Would you rephrase your question or provide some screenshot?

tera t Nov 13, 2007 - 1:27 AM

Hello.

The expression method of the icon.
Will the selection choice be a made thing?

Thank you.