ToolBar
-
I want to handle WM_MOUSEMOVE event of the toolbar. how to do it? i created one class for that as below. class CAnnotationBar : public CToolBarCtrl { // Construction public: CAnnotationBar(); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAnnotationBar) //}}AFX_VIRTUAL // Implementation public: virtual ~CAnnotationBar(); // Generated message map functions protected: //{{AFX_MSG(CAnnotationBar) afx_msg void OnMouseMove(UINT nFlags, CPoint point); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; and i created a instance variable for this class in my ActiveX control class. i Added the following code in OnCreate. CRect rc(0,0,600,50); m_AnnotationBar.Create(WS_CHILD|WS_VISIBLE|CBRS_TOP|CCS_TOP ,rc,this,IDR_TOOLBAR); m_AnnotationBar.MoveWindow(0,0,600,50); m_AnnotationBar.ShowWindow(SW_SHOW);