Jump to content
  • Advertisement
Sign in to follow this  
GuitarPlayer0912

Child windows auto-resize?

This topic is 4485 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'm currently in the midst of developing a Map Editor for a 2D RPG in c++. I just finished writing the engine yesterday (or so I think), and I have a seemingly trivial problem but it's not. When I create my main window, I also create 2 child windows in the main one. The main window is 800 x 600, and the child windows fit perfectly TO THE PIXEL thanks to the GetSystemMetrics function. But when I resize the main window (i.e. maximize), the child windows obviously stay the same size. I need help with a technique to auto-resize the child windows when the main one is resized. Here's what I tried, but it didn't work.
m_iWndWidth = GetSystemMetrics(SM_CXSCREEN); // Supposed to get window width, but gets COMPUTER MONITOR WIDTH!
m_iWndHeight = GetSystemMetrics(SM_CYSCREEN); // Same thing

MoveWindow(hChildWnd, 0, 0, m_iWndWidth, m_iWndHeight, FALSE); // This would be a situation with only 1 child window (for testing)

Share this post


Link to post
Share on other sites
Advertisement

This topic is 4485 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.

Guest
This topic is now closed to further replies.
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!