Drawing problems |
Post Reply |
Author | |
jamiei
Newbie Joined: 01 November 2003 Location: United Kingdom Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 04 November 2003 at 3:37pm |
I've got a standard SDI MFC app that I'm using two docking panes with. When these are docked to the left and then hidden, it seems to have trouble drawing them correctly on expanding, once it gets to a certain point it flickers and misses part of the dock + view. I've attached a picture of what I'm talking about. Weirdly, if I dock them on the bottom or top it seems to work ok. |
|
kstowell
Admin Group Joined: 25 January 2003 Location: MIchigan, USA Status: Offline Points: 496 |
Post Options
Thanks(0)
|
Hello, Try adding the WS_CLIPCHILDREN style to your CMainFrame class, for example: BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs){ if( !CFrameWnd::PreCreateWindow(cs) ) return FALSE; // TODO: Modify the Window class or styles here by modifying return TRUE; Please let me know if this helps. Cheers, |
|
jamiei
Newbie Joined: 01 November 2003 Location: United Kingdom Status: Offline Points: 4 |
Post Options
Thanks(0)
|
That worked great, thanks. Incidentally, I'm having trouble with a context menu in the docking pane (well the view that's attached to one anyway). It seems that I can only provide implementations for the ON_COMMAND or ON_UPDATE_COMMAND_UI handlers, not both. I was wondering if you might be able to suggest any reasons why this might be happening? Thanks again, Jamie Edited by jamiei |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
I tring to add context menu in "Advanced" sample void CHeroesView::OnContextMenu(CWnd* pWnd, CPoint point){
}
All work as expected. How do you call the menu? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jamiei
Newbie Joined: 01 November 2003 Location: United Kingdom Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Oleg, Sorry for not replying sooner. I tried using your code above, but for some reason my ON_COMMAND_UPDATE handler isn't being called. However, I was using the following and it almost worked: CMenu menu; CMenu* pSubMenu = menu.GetSubMenu(0);
I'm using this context menu in a TreeView derived class (within a docking pane). If a user highlights a tree item it should enable one of the menu options. Although this works (enabling/disabling), if I then click on the item to action the handler, it doesn't do anything and I get a warning in the debug window: "Warning: not executing disabled command 39776" Is it something odd to do with the cursor being updated when I click on the item and the update handler's called again, and disables it?
|
|
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 |