Print Page | Close Window

Removing border from MDI client

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=4454
Printed Date: 25 April 2024 at 4:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Removing border from MDI client
Posted By: ABuenger
Subject: Removing border from MDI client
Date Posted: 21 June 2006 at 11:42am
I would like to get rid of the border of the MDI client, which works fine by removing the WS_EX_CLIENTEDGE style, but only until a MDI child window is created.
 
Everytime the child windows position is beeing changed it calls UpdateClientEdge which turns the WS_EX_CLIENTEDGE style on Angry
 
Is it possible to hook the SetWindowLong call or the style change in an other way to remove the WS_EX_CLIENTEDGE style?
 
Or any other idea how to get rid of the border ultimately?
 
 
Thanks André
 


-------------
Codejock support



Replies:
Posted By: UlissesCappato
Date Posted: 03 March 2016 at 2:38pm
Any idea?


Posted By: rdhd
Date Posted: 30 September 2016 at 10:32am
Have you tried trapping the MDI child events in the frame and changing the style to remove the client edge? You should be getting a WM_MDICREATE message with the hWnd of the child passed in the WPARAM. Try changing the child window style to remove the style when that message arrives. Also, it looks like the MFC method won't change the client edge of the frame if you are using MDI tabs.

Alternatively, you can subclass the CMDIChildWnd and avoid the style. I have not done that since we don't use the MFC document/view pattern. We remove the client edge style too but since we don't use MFC child windows, this hasn't caused us a problem.


Posted By: cpede
Date Posted: 30 September 2016 at 12:55pm
This sounds like the problem I reported in: http://forum.codejock.com/forum_posts.asp?TID=17941" rel="nofollow - http://forum.codejock.com/forum_posts.asp?TID=17941 .

Can you confirm, that this is the same behavior, and that this will be fixed in XTPToolkit v17.3.

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: rdhd
Date Posted: 30 September 2016 at 3:35pm
I don't thing CJ has an UpdateClientEdge API. But MFC does and the code will change your frame's setting to match the MDI child window. So that's what I figured he was talking about.

I haven't noticed an issue with our frame when using the tabbed document framework of CJ. I don't set the client edge style. But again, I'm not using the Document/View framework.

I do use the tabbed MDI stuff. In order to get the MDI tabbed interface with CJ for our app, I had to edit CXTPTabClientWnd and make MDIGetActive virtual so I could override it. I don't recall all the gory details but basically the code routed to a method (in MFC?) that got the window handle via WM_MDIGETACTIVE and then called CWnd::FromHandlePermanent. So it failed to find a CWnd. In my override I sent the message and then return CWnd::FromHandle.



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