CompuServe Thread

CDialogBar & controls

1 messages in this thread
#30432From: Tarn Faulkner [MSFT]Jul 10, 1994 7:02 PM
Richard, >> I need to use a group of CBitmapButtons that will act the same way as a group of Radio buttons. I haved tried to use the SetCheck & GetCheck methods to know how the draw the buttons but the GetCheck always comes back FALSE. Any suggestions here would be appreciated. << Usually GetCheck should work in this case. Are the radio buttons that are on your dialog (or that you created dynamically) created with the BS_RADIOBUTTON or BS_AUTORADIOBUTTON styles? If not, then they wouldn't return valid values for GetCheck or GetState… >> Also I have derived a class off of CDialogBar and would like the messages from the Controls within this class to go directly to the message map of the derived class like a CDialog derived class would work. Currently I am routing the messages thru the CMainFrame class. << All control bars pass their WM_COMMAND messages (among other notifications) to their parent frame windows. CControlBar::WindowProc, in BARCORE.CPP in your MFC\SRC directory, is the handler that does this. You could add your own override of WindowProc in your derived class to change this as you like — keeping in mind that you're changing the underlying functionality so you might need to change your code for future versions of Visual C++. Hope this helps. Tarn Faulkner Microsoft Developer Support