Attaching pane causes form view paint problems! |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 01 August 2006 at 4:10am |
I have an MDI application where all views are held by a CXTPTabClientWnd variable. In one of my form views I have a auto-hiding pane placed at the top of the frame. If I attach it, the whole view gets repainted incorrectly.
I have to minimize the window and then maximize it again to get back my controls in their original shape. I have a similar pane in a calendar view, but the calendar seems to understand that it should repaint itself.
I have tried this inside my docking notification handler:
if (wParam == XTP_DPN_ACTION)
{ XTP_DOCKINGPANE_ACTION* pAction = (XTP_DOCKINGPANE_ACTION*)lParam;
if (pAction->action == xtpPaneActionAttached) GetActiveView()->Invalidate(); } I have also been playing with the WS_CLIPSIBLINGS and WS_CLIPCHILDREN styles, with no success. What is causing this redraw problem?
Please help!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
You can attach project here and I will show where problem.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
The project found at the address below has three problems: 1) It paints incorrectly when the pane is attached (see attached screenshot).2) The auto-resizing controls do not behave correctly when the window is being resized in certain ways (see attached screenshot).
3) I get a lot of warnings when compiling. Where should I turn these off (I do not always want to ignore C4244)?
If you have time, then I wonder another thing too:
How do I attach a CXTPToolBar to the left of a specific view? That is, it should only appear when, say CMyViewWithAMenu is active. There is no sample showing this, and I haven't been able to figure out how to accomplish it. Thanks in advance! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
ps.
About warning - use search in forum, or update sources to 10.3
About toolbar - see GUI_Whidbey sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Thank you very much! All problems solved! \o/
Though, I wonder about this call: SetScaleToFitSize(CSize(1, 1)).
All controls are placed correctly, but they can be resized to non-visible. How would you make the controls "grow, but not shrink more than (cx, cy)"? Is the only way to handle OnGetMinMaxInfo in the main frame?
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Hi again! I played a bit with the Whidbey sample, and it suffers the same problem I have encountered: The menus loaded elsewhere than in CMainFrame are not dockable and cannot be placed vertically.
// This is a modified version of the CPropertiesPane in the Whidbey sample
int CPropertiesPane::OnCreate(LPCREATESTRUCT lpCreateStruct)
{ if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; VERIFY(m_wndToolBar.CreateToolBar(WS_TABSTOP|WS_VISIBLE|WS_CHILD|CBRS_TOOLTIPS | CBRS_LEFT | CBRS_GRIPPER, this)); // CBRS_LEFT does not help!
VERIFY(m_wndToolBar.LoadToolBar(IDR_PANE_PROPERTIES)); ...
}
What I want to do is to add a toolbar to the left, INSIDE ONE of my views. I do not want it to be visible in other views. Can it be done?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |