visual studio - Adding scrollbar to an activeX control in MFC -
i'm trying create activex control using microsoft foundation class library. i have created control. it's graph control. have placed buttons on control well. i trying add scrollbar control using cscrollbar class. i create control using cscrollbar::create method. can see control when use activex control in application. i have added onhscroll method control class. derives colecontrol class . when scroll use cscrollbar::getscrollpos scroll position returns zero. here code creating scrollbar in activex control. code control in mainclass.h file: private: cscrollbar m_hscrollbar; protected: afx_msg void onhscroll(uint nsbcode, uint npos, cscrollbar* pscrollbar); declare_message_map() code control in mainclass.cpp in oncreate() method creating scrollbar: m_hscrollbar.create(sbs_horz | ws_child| ws_visible , crect(rcbottomstrip.left , rcbottomstrip.bottom , rcbottomstrip.right , rcbottomstrip.bottom + (theight*3)/125),this, 315); m_hscrollbar.setscrol...