c++ - Auto Hiding CDockablePane on creation -
i have 3 dockable panes, each containing 1 image. 1 on left, 1 on right , 1 not visible. problem is, have 1 on right hidden default let 1 on left take entire space. have searched through doc find should call following on pane, nothing happens.
toggleautohide();
i don't know missing... here creation code in case helps:
// image docking panel creation if (!m_wndrawimage.create(_t("raw image"), this, imgrect, true, id_view_rawimgwnd, dwpanestyle| cbrs_right, afx_cbrs_regular_tabs, afx_cbrs_resize)) { trace0("failed create image tab window\n"); return -1; } if (!m_wndrefimage.create(_t("reference image"), this, imgrect, true, id_view_refimgwnd, dwpanestyle| cbrs_right)) { trace0("failed create image tab window\n"); return -1; } if (!m_wndcalibimage.create(_t("calibrated image"), this, imgrect, true, id_view_calibimgwnd, dwpanestyle| cbrs_right)) { trace0("failed create image tab window\n"); return -1; } m_wndimagepane1.enabledocking(cbrs_align_right | cbrs_align_left); m_wndimagepane2.enabledocking(cbrs_align_right | cbrs_align_left); m_wndimagepane3.enabledocking(cbrs_align_right | cbrs_align_left); cdockingmanager::setdockingmode(dt_smart); enabledocking(cbrs_align_any); enableautohidepanes(cbrs_align_any); // image panes dockpane(&m_wndimagepane3); cdockablepane* ptabbedbar2 = null; m_wndimagepane2.attachtotabwnd(&m_wndimagepane3, dm_show, false, &ptabbedbar2); m_wndimagepane2.showpane(false, false, false); m_wndimagepane3.showpane(true, false, true); m_wndimagepane3.toggleautohide(); //<---- problem here dockpane(&m_wndimagepane1); m_wndimagepane1.showpane(true, false, true);
thanks!
if understand problem correctly, want hide pane in app startup.
i use on_wm_showwindow()
message hide pane. this:
add cmainframe
class declaration:
afx_msg void onshowwindow(bool bshow, uint nstatus);
and add message map:
on_wm_showwindow()
and add main code:
void cmainframe::onshowwindow(bool bshow, uint nstatus) { cframewndex::onshowwindow(bshow, nstatus); // hide properties pane in startup m_wndproperties.setautohidemode(false, cbrs_align_any); m_wndproperties.showpane(false, false, false); }
hope can help!
Comments
Post a Comment