Originally posted by: Andrew
How make CSizingControlBar with gripper,caption and close button?
Originally posted by: Juekun Huang
In Line 143 of SizeingTabControl.cpp the initial code is
So you can modify the code as following
another error is the same in SetActiveView(int nNewTab) in line 186.
the modifed code is:
If you fixed the two error code ,you can use it correctly!
Friends can try the following way to fix the error.
I have tried many times to correct the error,Finally I found
out the mistake is that the zorder of all views in CSizeingTabControl are interrupt.
if (nViews!=1)
{
pWnd->EnableWindow(FALSE);
pWnd->ShowWindow(SW_HIDE);
}
else
{
((CFrameWnd *)GetParent())->SetActiveView((CView *)m_pActiveView);
}
if (nViews!=1)
{
//pWnd->EnableWindow(FALSE);
//pWnd->ShowWindow(SW_HIDE);
pWnd->SetWindowPos(&m_tabctrl, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_HIDEWINDOW );
}
else
{
if(pContext->m_pNewDocTemplate->IsKindOf(RUNTIME_CLASS(CMultiDocTemplate)))
((CFrameWnd *)GetParent())->SetActiveView((CView *)m_pActiveView);
}
the initial code is:
if (m_nActiveTab!=-1)
{
oldMember=m_views.GetAt(m_views.FindIndex(m_nActiveTab));
oldMember->pWnd->EnableWindow(FALSE);
oldMember->pWnd->ShowWindow(SW_HIDE);
}
newMember->pWnd->EnableWindow(TRUE);
newMember->pWnd->ShowWindow(SW_SHOW);
newMember->pWnd->SetFocus();
if (m_nActiveTab!=-1)
{
oldMember=m_views.GetAt(m_views.FindIndex(m_nActiveTab));
//oldMember->pWnd->EnableWindow(FALSE);
oldMember->pWnd->SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_HIDEWINDOW | SWP_NOZORDER);
//oldMember->pWnd->ShowWindow(SW_HIDE);
}
//newMember->pWnd->EnableWindow(TRUE);
//newMember->pWnd->ShowWindow(SW_SHOW);
//newMember->pWnd->SetFocus();
newMember->pWnd->SetWindowPos(&wndTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW );
I hope this will be useful to you!
Originally posted by: Mark
I am adding the views in my CMainFrame::OnCreate() method using 'AddView()'. If the control bar is initially showing
the views do NOT update or initialize themselves. (Even though the view's 'OnInitialUpdate()' is invoked!) If I then
click in each of the view's tabs the views are then drawn correctly.
Actually, clicking on the view's tab results in the same
method being invoked as calling the control bar's 'SetActiveView()' method. I tried calling 'SetActiveView()' after adding the views but it doesn't make any difference except making the specified tab the active one. Maybe the problem is that doing this during the main frame's 'OnCreate()' is too early.
How can I have a docking control bar with views added which
will display the view's window contents correctly when the
application first comes up?
I would appreciate any help on this.
Sincerely,
Mark Santelli
Reply
Originally posted by: Desmond Mc Givern
Hello,
I find that if you minimixe the application when the tree is opened to one of its leafs and then resize it again i.e. click the taskbar once then twice, the tree dissapears to grey except for the currently selected leaf. This also happens on the demo program. Does anybody know how to rectify this?
Desmond Mc Givern
ReplyOriginally posted by: GyuSang Jeong
My program is MDI.
I embedded it in word pad as OLE Server (InPlace).
activate OLE Server and deactivate and active and deactivate ...
After 3 or 4 times, word pad is dead.
I guess that problem is occured in CSizingTabCtrlBar.
How can I solve this problem???
Help me
Originally posted by: Michael Andrews
UINT CMyTreeCtrl::OnNcHitTest(CPoint point)
// Call to HitTest needs client coords
// Don't bother unless we're over a tree item
For those using a CTreeView class, you could probably override the OnSetCursor or OnMouseMove member
functions just as well.
This is probably a bonehead way around the problem, but if you override the OnNcHitTest for your TreeCtrl
class you can put this code in to fix the problem:
{
UINT uFlag;
CPoint pt = point;
ScreenToClient (&pt);
if (HitTest (pt, &uFlag) != NULL)
{
if (GetToolTips () != NULL)
GetToolTips ()->SetWindowPos (&wndTop, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE |
SWP_NOMOVE);
}
return CTreeCtrl::OnNcHitTest(point);
}
Originally posted by: dharry
I would like to know what is the use of [AFX_IDW_DOCKBAR_BOTTOM] in the code below.
m_pDockSite->GetControlBar(AFX_IDW_DOCKBAR_BOTTOM)->GetWindowRect(rc);
Originally posted by: Nayuta Taga
I dont know the solution, but winamp (http://www.winamp.com/) does it!
Does anyone know the trick which winamp uses ?
>If you change your gradient to be (dark green ------- light green)
>moving mouse across the non-client area causes the Close,
>Min/Max buttons to be painted on a blue background anyway.
>Something else but not WM_NCPAINT paints that area.
>Does any body have a solution to correct this problem! I
>want to choose another colors for my caption bar?
Originally posted by: Kenneth Kasajian
Or add the following to the end of the macro:
ActiveDocument.Selection.Cancel
Originally posted by: barsteng
Thanks,Bob!
But when I use ADO to open an Access database,I find that I can't use the OpenSchema method.The error
message is "The operation requested by the application is not supported by the provider".Why?
And how do I use OpenSchema?