I have this pretty straight forward code where i have a toolbar, i add some buttons to the toolbar and then do the appropriate message mapping etc.
However, for some reason when i press the button the code isn't executed... here's some sample code:
now the line "((CSessionFrame*)sess_frame)->zoomIn();" should be reached when the IDC_SF_ZOOMIN button is pressed... BUT when i run in Debug mode, and i press the button, nothing happens, i set a break there and it is never reached, but what i get at the debug output is "Warning: no message line prompt for ID 0x9C49".Code:BEGIN_MESSAGE_MAP(CSessionFrameToolbar, CToolBar) ON_WM_CREATE() ON_COMMAND(IDC_SF_ZOOMIN, OnPressZoomIn) ON_UPDATE_COMMAND_UI(IDC_SF_ZOOMIN, OnUpdateZoomIn) ON_CBN_SELENDOK(IDC_SF_COMBOBOX, OnSelectCam) END_MESSAGE_MAP() //setup the buttons etc. in OnCreate() afx_msg void CSessionFrameToolbar::OnPressZoomIn() { ((CSessionFrame*)sess_frame)->zoomIn(); } afx_msg void CSessionFrameToolbar::OnUpdateZoomIn(CCmdUI *pcmd) { pcmd->SetCheck(FALSE); }
seems like this should be pretty straight forward.... can anyone see anything criminally obvious?
cheers.



LinkBack URL
About LinkBacks



CornedBee