Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTSplitterWnd not brought to top
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTSplitterWnd not brought to top

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTSplitterWnd not brought to top
    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?
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.