Tool Bars Problem
-
I've got some problem with it. I try to make 2 toolbars with rebars, and when i show them all - everything is OK, but when i try to hide one of them - another toolbar doesn't repaint it self fully (just buttons that it has), and doesnt get the full avaluable area. Here how i make them:
if (!m_wndToolBar.CreateEx(this) ||
!m_wndToolBar.LoadToolBar(IDR_GPS_PANEL))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!m_wndDBToolBar.CreateEx(this) ||
!m_wndDBToolBar.LoadToolBar(IDR_TOOLBAR_DBLAYER))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}if (!m\_wndReBar.Create(this) || !m\_wndReBar.AddBar(&m\_wndDBToolBar) || !m\_wndReBar.AddBar(&m\_wndToolBar)) { TRACE0("Failed to create rebar\\n"); return -1; // fail to create }
And It Looks Like This: ||Button1(from first toolbar)|Button2(from first toolbar)||Button1(from second toolbar When i hide the first toolbar i have this: ||Button 1(from second toolbar)||...And this area doesnt repaint!!! Only the Buttons on this panel are still ok... Please help...
-
I've got some problem with it. I try to make 2 toolbars with rebars, and when i show them all - everything is OK, but when i try to hide one of them - another toolbar doesn't repaint it self fully (just buttons that it has), and doesnt get the full avaluable area. Here how i make them:
if (!m_wndToolBar.CreateEx(this) ||
!m_wndToolBar.LoadToolBar(IDR_GPS_PANEL))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
if (!m_wndDBToolBar.CreateEx(this) ||
!m_wndDBToolBar.LoadToolBar(IDR_TOOLBAR_DBLAYER))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}if (!m\_wndReBar.Create(this) || !m\_wndReBar.AddBar(&m\_wndDBToolBar) || !m\_wndReBar.AddBar(&m\_wndToolBar)) { TRACE0("Failed to create rebar\\n"); return -1; // fail to create }
And It Looks Like This: ||Button1(from first toolbar)|Button2(from first toolbar)||Button1(from second toolbar When i hide the first toolbar i have this: ||Button 1(from second toolbar)||...And this area doesnt repaint!!! Only the Buttons on this panel are still ok... Please help...
How do you hide/show the toolbars (what kind of functions do you use)? Regards, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)