Menu

Explorer sample, toolbar height, 7.7 vs. 7.6.1

Help
peterme
2015-02-02
2015-02-03
  • peterme

    peterme - 2015-02-02

    Hi David,

    in 7.6.1, Explorer sample, file Mainfrm.cpp, when commenting out the line
    SetToolBarImages(RGB(192,192,192), IDB_TOOLBAR_NORM, IDB_TOOLBAR_HOT, IDB_TOOLBAR_DIS);
    the toolbar's height simply was shrinked somehow ... as desired.
    Doing the same with 7.7, the lower part of the toolbar simply is cutted away.
    How to get back the old behaviour?

    By the way, could you explain a bit why changing
    CLeftPane m_LeftPane;
    CRightPane m_RightPane;
    to
    CLeftPane
    m_pLeftPane;
    CRightPane m_RightPane;
    and setting within CMainFrame::CMainFrame() the view to m_RightPane instead of m_LeftPane?
    Cannot understand the reason of this change.

    Best Regards!
    Peter

     
  • David

    David - 2015-02-03

    Hi Peter,

    Thanks for mentioning this. I've fixed a bug in setting the Toolbar buttons with text. You can use Tortoise SVN to download the updated code. Alternatively, as a work around, you could use:

    //SetToolBarImages(RGB(192,192,192), IDB_TOOLBAR_NORM, IDB_TOOLBAR_HOT, IDB_TOOLBAR_DIS);
    SetToolBarImages(RGB(192,192,192), IDW_MAIN);
    

    The reason for the change in the left and right panes in the explorer example is as follows:

    In version 7.6.1 the explorer panes use proportional resizing. When the frame window is resized, both the left and right panes are resized proportionally. With proportional resizing it doesn't matter which pane (left or right) is the docker parent and which is the child. It so happened that the left pane was the docker parent and the right pane was the docker child.

    In version 7.7 the explorer panes use fixed size resizing. When the frame window is resized, the left pane maintains a fixed size. This behaviour is more natural in my opinion and mirrors the way the windows explorer works. Since the left pane has a fixed size, it must now be the docker child and therefore the right pane must be the docker parent. The MainFrame's view window is the docker parent.

    Best regards,
    David

     
  • peterme

    peterme - 2015-02-03

    Hi David,

    The workaround works fine using the syntax SetToolBarImages(RGB(192,192,192), IDW_MAIN, 0, 0);
    .
    Does the fix mean the changed frame.h and gdi.h as from r1921? (Tried those without noticeable improvement).
    .
    Thanks for the detailed explanation about the panes resizing, got it now!

    Best Regards,
    Peter

     
  • peterme

    peterme - 2015-02-03

    Oh, i did a mistake .. in fact the fix is good and does solve the problem :-)

     

Log in to post a comment.