Print Page | Close Window

CXTSplitterWnd not brought to top

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=6317
Printed Date: 14 May 2024 at 3:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTSplitterWnd not brought to top
Posted By: znakeeye
Subject: CXTSplitterWnd not brought to top
Date Posted: 04 February 2007 at 1:03pm
I have a ribbon application with multiple views handled by a CXTPTabClientWnd with no groups. One of the frames contains a splitter with two views. This frame is correctly shown when it is being created. However, if it has already been created and minimized, it refuses to show when I order it to be shown.
 
This works for all views with NO splitter window:
 
...
wpl.showCmd = SW_SHOWMAXIMIZED; // Bring window to top
pWnd->SetWindowPlacement(&wpl);
pWnd->BringWindowToTop();
 
Question:
How do I bring the splitter and its views to top?



Replies:
Posted By: znakeeye
Date Posted: 04 February 2007 at 3:47pm
A frame with no splitter generates the following messages when I click on its tab (a ribbon button):
 
<00028> 000401D4 R WM_ACTIVATE
<00029> 00040374 S WM_CAPTURECHANGED hwndNewCapture:00000000
<00030> 00040374 R WM_CAPTURECHANGED
<00031> 000403A0 S WM_CHILDACTIVATE
<00032> 000403A6 S WM_MDIACTIVATE hwndDeactivate:000403A6 hwndActivate:000403A0 (deactivating)
<00033> 000A01CE S WM_MDIREFRESHMENU
<00034> 000A01CE R WM_MDIREFRESHMENU hmenuFrame:00000000
<00035> 000403A6 R WM_MDIACTIVATE
<00036> 000A01CE S WM_MOVE xPos:2 yPos:148
<00037> 000A01CE R WM_MOVE
<00038> 000A01CE S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:1276 nHeight:850
<00039> 000A01CE R WM_SIZE
 
 
... where as the frame with the splitter generates:
 
<00028> 000401D4 R WM_ACTIVATE
<00029> 00040374 S WM_CAPTURECHANGED hwndNewCapture:00000000
<00030> 00040374 R WM_CAPTURECHANGED
<00031> 0004039C S WM_CHILDACTIVATE
<00032> 0004039C R WM_CHILDACTIVATE
<00033> 000401D4 S WM_ACTIVATE fActive:WA_INACTIVE fMinimized:False hwndPrevious:(null)
<00034> 000401D4 R WM_ACTIVATE
<00035> 00040384 S WM_KILLFOCUS hwndGetFocus:(null)
<00036> 00040384 R WM_KILLFOCUS
 
Any ideas why WM_MDIACTIVATE is not sent?
Thanks!


Posted By: znakeeye
Date Posted: 04 February 2007 at 4:15pm
I solved it. Though, I do not like the solution. Before the call SetWindowPlacement I have to get hold of the CFrameWnd in case of a CXTSplitterWnd:
 
 
// This could be a splitter window
if (!pWnd->IsKindOf(RUNTIME_CLASS(CFrameWnd)))
{
    CFrameWnd *pFrameWnd = pWnd->GetParentFrame();
    if (pFrameWnd)
        pWnd = DYNAMIC_DOWNCAST(CWnd, pFrameWnd);
}
 
// Now I can call pWnd->SetWindowPlacement(...)
 
Two hours of struggling! Oh, well. I deserve a coffee break now



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net