Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

how to creat a child window[SOLVED]

This topic is 4789 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!