ocZio
asked on
CToolBar Problem or ?
Hi All, this is my first time here and I have a little MFC problem.
Here is the code:
// in my CMain class
CToolBar m_wndToolBar;
CStatusBar m_wndStatusBar;
// in CMain::OnCreate
if (!m_wndToolBar.CreateEx(th is, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar( IDR_TOOLBA R1))
{
return -1; // failed
}
if(!m_wndStatusBar.Create( this))
{
return -1; // failed
}
Question:
Everything works fine when I run my app I got the ToolBar and StatusBar, now my question is
when I resize my window, inside my toolbar/statusbar I can see some kind of white lines or some flashes like changing color very fast grey->white->grey any ideas how I can fix it ? or it should be like that ? :) thx in Advance.
Sorry for my BAD english :)
Here is the code:
// in my CMain class
CToolBar m_wndToolBar;
CStatusBar m_wndStatusBar;
// in CMain::OnCreate
if (!m_wndToolBar.CreateEx(th
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(
{
return -1; // failed
}
if(!m_wndStatusBar.Create(
{
return -1; // failed
}
Question:
Everything works fine when I run my app I got the ToolBar and StatusBar, now my question is
when I resize my window, inside my toolbar/statusbar I can see some kind of white lines or some flashes like changing color very fast grey->white->grey any ideas how I can fix it ? or it should be like that ? :) thx in Advance.
Sorry for my BAD english :)
ASKER
Hi ZOPPO,
No I don't have the RecalcLayout() after the creation, even If I put there it doesnt change something I still have the same effect :), at msdn it tells that it will be called on Resize or when the controlbars are toggled on or of, I tried to use it in CMain::OnSize() with the MESSAGE_MAP but still the same result :O
No I don't have the RecalcLayout() after the creation, even If I put there it doesnt change something I still have the same effect :), at msdn it tells that it will be called on Resize or when the controlbars are toggled on or of, I tried to use it in CMain::OnSize() with the MESSAGE_MAP but still the same result :O
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I assume CMain is you frame window (either main or child frame), CFrameWnd derived
if so, do you call RecalcLayout() after creating the toolbar/statusbar?
ZOPPO