Solved

splitter and toolbar

Posted on 2002-05-25
11
621 Views
Last Modified: 2013-11-20
Hi,
I have SDI and splitter. One pane is from class CTabView: public CControlView.
I could split this view verticaly and at bottom part made from CFormFiew put combo or buttons and make non-sized but ...
Is it possible to make view not to cover all pane and to snap toolbar
I try GetPane(), GetParentFrame() to access frame of pane and add toolbar but don't work?
0
Comment
Question by:plamtod
  • 5
  • 5
11 Comments
 
LVL 12

Expert Comment

by:migel
ID: 7034621
Hi!
I think that you need write new window that will hold your view and toolbar as childs and create this new window during split creatoin.
0
 
LVL 1

Expert Comment

by:gurly
ID: 7034995
Can you place the toolbar on your view ? It won't be docked, and you'll have to handle its positioning yourself, but it will be there.
0
 

Author Comment

by:plamtod
ID: 7039703
I try to create and load toolbar for my TabView class but it not appear
0
 
LVL 1

Expert Comment

by:gurly
ID: 7040982
Where did you place it ?
Where in the code did you handle the toolbar positioning ?
0
 

Author Comment

by:plamtod
ID: 7041031
I saw DLGCBR32 to put toolbar in dlg and use part of it.When size window there is a position where i see toolbar but it is not moving since sizing but in the begining it is not appear. My code is in TabView derived class used for one of the panes of splitter.
I try to use  CFrameWnd derived class in CreateView() of splitter for the same pane and create toolbar in this CMyFrame but toolbar not appear again.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Accepted Solution

by:
gurly earned 50 total points
ID: 7041051
I'm not sure I understand what you say, but I think you should move the toolbar in your TabView::OnSize. Something like:
void TabView::OnSize(UINT nType, int cx, int cy)
{
  CRect rc;
  GetClientRect(rc);
  if (::IsWindow(m_oToolbar.m_hWnd))
  {
     m_oToolbar.MoveWindow(2, 0, rc,Width(), 30);
     m_oToolbar.ShowWindow(SW_SHOW);
     m_oToolbar.BringWindowToTop();
  }
}

Try it.
0
 

Author Comment

by:plamtod
ID: 7041112
O.K.
I SUCCEED! But is needed BringWindowToTop and ShowWindow
In frame wnd maybe frame call this functions.
You could say that this is another question but some boring flickering appear after added this code in OnSize(when sizing). Any idea to work around it?
0
 
LVL 1

Expert Comment

by:gurly
ID: 7041143
I don't know.
In my application the two calls were necessary. I think it has to do with your windows z-order.
Try without one of them. (I think it should also work without ShowWindow).
0
 

Author Comment

by:plamtod
ID: 7041146
O.K.
I SUCCEED! But is needed BringWindowToTop and ShowWindow
In frame wnd maybe frame call this functions.
You could say that this is another question but some boring flickering appear after added this code in OnSize(when sizing). Any idea to work around it?
0
 

Author Comment

by:plamtod
ID: 7041148
OK
0
 
LVL 1

Expert Comment

by:gurly
ID: 7041288
Maybe you can check if the window is visible and top-most before you call these functions (use GetWindowPlacement).
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 112
unable to delete all specified values regedit 38 283
viewing source code from eclipse 13 89
sum67 challenge 35 93
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now