Sign in to follow this  
kingpinzs

how to creat a child window[SOLVED]

Recommended Posts

I am trying to make a map editor using windowed mode directdraw. First question is how to make a child window? second question is do I need direct draw inlized in that second window if it is going to hold all the tiles does directdraw need to be inlized for it and if so how is that done? I did find a tutorial on how to make a child window but it was way more complex to understand for me. Thanks [Edited by - kingpinzs on July 6, 2005 4:40:19 PM]

Share this post


Link to post
Share on other sites
Does any one know how to do this or were I can find out how to do it

[Edited by - kingpinzs on July 5, 2005 6:37:52 PM]

Share this post


Link to post
Share on other sites
Uhhm to anchor it wouldn't you just get the bottom right coords of the Parent Window and make that the top right of the Child Window? Would require a few calculations and when windows detects a resize or move on the parent then adjust the position of the child to the new specifications. That is kind of pseudo code what I said but yeah shouldn't be too hard to do in MFC seeing as when you setup your windows there are width height and position properties

Share this post


Link to post
Share on other sites
Just do like so:

ChildWindowX = ParentWindowWidth - ChildWindowWidth;
ChildWindowY = ParentWindowHeight - ChildWindowHeight;



I'd recommend subtracting 1 or 2 from that so you're not RIGHT on the edge.

Note that this code is for the bottom right of the parent window, to do the left, ChildWindowX would be 0 (ChildWindowY would be computed the same.)

Share this post


Link to post
Share on other sites
I don't know how to make a window so that it can't be dragged (other than by not creating it with a titlebar.)

It seems that you want to make a docking window? So you could possibly try googling that.

Sorry I can't help you!

Share this post


Link to post
Share on other sites
never mind. I figured out how to make a a docked child window with tabs now I can make my map editor exactley the wat I desined it on paper.

thanks for every ones help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this