Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Removing border from MDI client
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Removing border from MDI client

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Removing border from MDI client
    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
Back to Top
UlissesCappato View Drop Down
Groupie
Groupie


Joined: 03 February 2007
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote UlissesCappato Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2016 at 2:38pm
Any idea?
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 605
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 540
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2016 at 12:55pm
This sounds like the problem I reported in: 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 (18.0.1)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 605
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.109 seconds.