Buttons Not Enabled On My DialogBar
-
I am sure it's something simple that I'm over looking. I created a Dialog Bar and added some controls to it. I also created a class derived from CDialogBar. When I create my dialog bar in the main frame all the controls are functional except the buttons. The code I have is this:
class CLineBar : public CDialogBar { DECLARE_DYNAMIC(CLineBar) public: CLineBar(); virtual ~CLineBar(); protected: DECLARE_MESSAGE_MAP() }; ...... CLineBar m_LineBar; ....... m_LineBar.Create(this, IDD_LINE_DLG, WS_CHILD|WS_VISIBLE|CBRS_LEFT,0);
Any suggestions? Thanks. -
I am sure it's something simple that I'm over looking. I created a Dialog Bar and added some controls to it. I also created a class derived from CDialogBar. When I create my dialog bar in the main frame all the controls are functional except the buttons. The code I have is this:
class CLineBar : public CDialogBar { DECLARE_DYNAMIC(CLineBar) public: CLineBar(); virtual ~CLineBar(); protected: DECLARE_MESSAGE_MAP() }; ...... CLineBar m_LineBar; ....... m_LineBar.Create(this, IDD_LINE_DLG, WS_CHILD|WS_VISIBLE|CBRS_LEFT,0);
Any suggestions? Thanks.Please add the ON_UPDATE_COMMAND_UI handler for the Button . Regards, FarPointer Blog:http://farpointer.blogspot.com/
-
I am sure it's something simple that I'm over looking. I created a Dialog Bar and added some controls to it. I also created a class derived from CDialogBar. When I create my dialog bar in the main frame all the controls are functional except the buttons. The code I have is this:
class CLineBar : public CDialogBar { DECLARE_DYNAMIC(CLineBar) public: CLineBar(); virtual ~CLineBar(); protected: DECLARE_MESSAGE_MAP() }; ...... CLineBar m_LineBar; ....... m_LineBar.Create(this, IDD_LINE_DLG, WS_CHILD|WS_VISIBLE|CBRS_LEFT,0);
Any suggestions? Thanks.The controls are disabled because you don't have
WM_COMMAND
handlers for them yet. Either add handlers, or set the main frame'sm_bAutoMenuEnable
member tofalse
.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ