CToolbar positioning - Programmer

This is a discussion on CToolbar positioning - Programmer ; Hello, world!!! I'm working on an MFC program that sometimes decides to reposition its multiple docked CToolbar controls when I minimize and restore it. I've been digging around in the MFC source code and haven't been able to find what ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: CToolbar positioning

  1. CToolbar positioning

    Hello, world!!!

    I'm working on an MFC program that sometimes decides to reposition
    its multiple docked CToolbar controls when I minimize and restore it.
    I've been digging around in the MFC source code and haven't been able
    to find what could be causing this or even how the toolbars are
    positioned.

    I would welcome any ideas how to approach this problem.

    TIA,
    H.R.

  2. Re: CToolbar positioning

    Hi,

    You can use the following functions (MFC Library Reference), to
    dock, obtain and store information about each control bar owned by
    the frame window:

    CFrameWnd:ockControlBar

    CFrameWnd::LoadBarState

    CFrameWnd::SaveBarState

    http://msdn2.microsoft.com/en-us/library/kc9dywd6.aspx

    http://msdn2.microsoft.com/en-us/8d16dk62.aspx

    http://msdn2.microsoft.com/en-us/library/0kb70y3w.aspx

    Hope these suggestions helps,

    Kellie.


  3. Re: CToolbar positioning

    This would happen if you have toolbars which have common IDs. Each of
    the toolbars should have a distinct ID. This is the last parameter in
    CToolBar::Create. If you dont specify this parameter, the toolbar ID
    gets the default value of AFX_IDW_TOOLBAR.

    ----
    Ajay

    Howard Rubin - change nospam to nyx wrote:
    > Hello, world!!!
    >
    > I'm working on an MFC program that sometimes decides to reposition
    > its multiple docked CToolbar controls when I minimize and restore it.
    > I've been digging around in the MFC source code and haven't been able
    > to find what could be causing this or even how the toolbars are
    > positioned.
    >
    > I would welcome any ideas how to approach this problem.
    >
    > TIA,
    > H.R.



+ Reply to Thread