Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to manually uncheck toolbar buttons
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to manually uncheck toolbar buttons

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 683
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: How to manually uncheck toolbar buttons
    Posted: 12 October 2004 at 3:01pm

How do I check toolbar buttons. I have 3 buttons that I want to make to work like radio buttons. When one is checked the otherons are unchecked etc.

I cannot use the CmdUI methods. But I found that it should be possible calling a xtpFlagManualUpdate flag.

The code below is my best try when the last button is pressed, I expect the others to be unchecked, but they dosen't. One by one alle the buttons are checked, non of them gets unchecked.

What am I doing wrong?

pControl = ((CXTPControlButton*)m_ToolBar.GetControls()->FindControl (DX_COM1));
pControl->SetFlags(xtpFlagManualUpdate);
pControl->SetChecked(FALSE);

pControl = ((CXTPControlButton*)m_ToolBar.GetControls()->FindControl (DX_COM2));
pControl->SetFlags(xtpFlagManualUpdate);
pControl->SetChecked(FALSE);

pControl = ((CXTPControlButton*)m_ToolBar.GetControls()->FindControl (DX_COM3));
pControl->SetFlags(xtpFlagManualUpdate);
pControl->SetChecked(TRUE);

cpede

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.