t_sridevi
March 21st, 2002, 07:21 AM
I created an MFC MDI Application
Selected the option of default toolbar while creating the project.
I am getting the toolbar with the tool tips. When I move the cursor on the toolbar, on whichever icon the focus is, I get the tooltip immediately(Say - Save, Cut, Copy..etc)
I copied the same code on to ChildFrame OnCreate function.
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
//****
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |CBRS_LEFT| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) |
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
return 0;
}
On opening the Child window, I could see the toolbar. But when I move the cursor on the toolbar, the tooltip is not shown immediately. I have to move the cursor along the toolbar for sometime then the tooltip is shown. Why is this occurring. I have not added any of my code...
Need help on this phenomenon.
Selected the option of default toolbar while creating the project.
I am getting the toolbar with the tool tips. When I move the cursor on the toolbar, on whichever icon the focus is, I get the tooltip immediately(Say - Save, Cut, Copy..etc)
I copied the same code on to ChildFrame OnCreate function.
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
//****
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE |CBRS_LEFT| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) |
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
return 0;
}
On opening the Child window, I could see the toolbar. But when I move the cursor on the toolbar, the tooltip is not shown immediately. I have to move the cursor along the toolbar for sometime then the tooltip is shown. Why is this occurring. I have not added any of my code...
Need help on this phenomenon.