Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6878671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:45:09+00:00 2026-05-27T04:45:09+00:00

What is the best practices for laying out child windows (common controls) in a

  • 0

What is the best practices for laying out child windows (common controls) in a dialog box or main window? I mean is there a binding mechanism which would fix a relative positions of the control to parent window’s border like in WPF. And during window resize the child control would resize together with the main window.
Currently I have this:
List view dialog

As you can see from the red lines it does not look pretty when I am resizing parent window of a list view control. I would like to bind for example ListView’s right side to DialogBox’s right border and similarly other controls.

I know that I can play around with GetWindowRect, GetClientRect and MoveWindow functions. But is this the correct way?

Currently I am working with pure Win32 Api without MFC.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:45:09+00:00Added an answer on May 27, 2026 at 4:45 am

    If you’re just using the Win32 API, you normally handle this by handling the WM_SIZE message, and respond by calling GetClientRect on the parent window and MoveWindow on the children to move/resize the children to fill the parent appropriately.

    If you want to badly enough, you can (of course) implement a layout manager, so the rest of the program doesn’t need to handle things like this directly. At least IME, doing this well is sufficiently difficult that it’s rarely worth the trouble unless you can make quite a lot of use of that layout code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for best practices here. Sorry. I know it's subjective, but there are
Are there any best practices to keep in mind while designing API's which ensures
Is there a general best-practices way of being notified when the current view controller
Are there any best practices regarding the order of nested JOINs in MySQL queries?
A general best-practices question. Say I have a search box and a web form
Are there any best practices on how to build a Kentico CMS Portal implementation
Are there any guidelines / best practices on developing a class library (custom internal
In PHP , what is the best practice for laying out the responsibilities of
What would the best practice be for laying out the following item? Valid XHTML
Best practices question: Is there anything improper about creating a new object within another

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.