Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

Help using 2 child windows

This topic is 4831 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 can put the 2 child windows in but when I resize the second child window does not resize correctly.
RECT rcClient3 ; 
         RECT rcClient2 ;
         GetClientRect( hwnd, &rcClient3 ) ; 
         GetClientRect( hwnd, &rcClient2 ) ; 
          

       
       MoveWindow( g_ChildWnd,  rcClient3.left  , rcClient3.top, 
                 rcClient3.right  , 
                  25, TRUE ) ; 
  
          MoveWindow( ChildWnd2,rcClient2.left  , rcClient2.top +450 , 
                 rcClient2.right  , 
               rcClient2.bottom  , TRUE ) ;  



first am I resizing correctly? second why does " rcClient2.top +450 " stay at just 450 when I resize instead of changing top of window plus add 450? [Edited by - kingpinzs on July 25, 2005 6:06:56 PM]

Share this post


Link to post
Share on other sites
Advertisement
First, correct punctuation and grammar would've helped me understand your problem much more quickly.

Second, GetClientRect() doesn't deal with the absolute position of the window on the desktop, but is only used for getting the size of the window's client area. Therefore, rcClient2.left and rcClient2.top (and those of rcClient3) will be 0, and rcClient2.top + 450 will always be 450. (The documentation at the MSDN Library is a good way of finding these things out.)

Hope that helps,
Twilight Dragon

Share this post


Link to post
Share on other sites
well then how in the world would I put the second child window on the bottom of the parent window and have it only 150 pixels high?

Share this post


Link to post
Share on other sites
sweet with a littlt ajustment


"MoveWindow( ChildWnd2,0 , rcClient2.bottom - 150 ,
rcClient2.right,150 , TRUE ) ; "


It worked great. I thought I tried that but I geuss not. Thanks for all your help

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!