c++ - How to connect an MFC control to a custom control in the visual dialog editor -
i have created custom control in mfc visual dialog designer, shown below:
however, unsure how can link custom control (in case have created class cgraphctrl
inherits cwnd
) region have created in visual editor, assumed able when called cgraphctrl::create
, however, takes const crect&
argument, overrides region specified. calling cgraphctrl::create
in cstockmanagerdlg::oninit
follows:
m_graphctrl.create( _t("static"), _t("graph control"), ws_child | ws_visible, crect( 0, 0, 100, 100 ), this, idc_graph );
you can create cstatic control in visual dialog editor. right-click on , create control member variable cstatic m_graphctrl. edit code make cgraphctrl m_graphctrl. attaches code original cstatic.
Comments
Post a Comment