CDialogBar Help
-
Hi, I'm trying to implement a dialog bar in my MDI application. First, for some reason any ON_BN_CLICKED handler that I add to the CDialogBar derrived class doesn't get handled. The buttons are still greyed out. I have to manually add ON_BN_CLICKED handler to the CMainFrame at which point the function inside CMainFrame never gets called but the one inside CDialogBar does. That's weird. What I really want is to be able to handle dialog bar commands inside the CDocument. Do I have to route them manually from CMainFrame? I was hoping a DialogBar would behave like a control bar and I could easily add handlers inside the CDocument, but that doesn't look like it. Thanks.
-
Hi, I'm trying to implement a dialog bar in my MDI application. First, for some reason any ON_BN_CLICKED handler that I add to the CDialogBar derrived class doesn't get handled. The buttons are still greyed out. I have to manually add ON_BN_CLICKED handler to the CMainFrame at which point the function inside CMainFrame never gets called but the one inside CDialogBar does. That's weird. What I really want is to be able to handle dialog bar commands inside the CDocument. Do I have to route them manually from CMainFrame? I was hoping a DialogBar would behave like a control bar and I could easily add handlers inside the CDocument, but that doesn't look like it. Thanks.
Also I have a class that I derrived from CDialogBar. Inside it I have a function to disable my controls that contains something like: CWnd *test = this->GetDlgItem(IDC_ADDKEYFRAME); test->EnableWindow(FALSE); this doesn't disable the button. Why not? I've also tried adding control variables and initialize them using DDX. The variables get initialized, the HWND value match what I get from GetDlgItem call, but the button never gets disabled.