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

  • SEARCH
  • Home
  • 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 3694386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:29:26+00:00 2026-05-19T04:29:26+00:00

I have a window with child windows inside in it. The child windows take

  • 0

I have a window with child windows inside in it. The child windows take up about 1000 pixels of vertical space. However, our users don’t always have 1000 pixels of vertical space available – they might have as little as 500 or 600 pixels.

I want to be able to display this window at a size of 500 pixels high, and have the user “scroll” up and down the window to see the full contents. The window should always be 500 pixels high, but the view within it should change.

Assume I can add a scroll bar somewhere so the user can choose which part of the window he wants to see. Windows will normally paint the window contents from height 0 to height 500; how do I tell it instead to “paint from height 250 to height 750”, for example?

I know that I can set the viewport with functions like SetViewportOrgEx etc, but those functions require a device context – when do I call them if I want them to be “permanent”? Do I call them when I get the WM_PAINT message from windows? Or at some other time? And which functions from that family do I want to use?

Edit to add: I don’t want to actually change the position of the child windows – they should stay at the same position, and the only thing that should change is the view into the window.

Thanks.

  • 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-19T04:29:26+00:00Added an answer on May 19, 2026 at 4:29 am

    If (when you get messages about the scroll bars changing) you call ScrollWindowEx with the SW_SCROLLCHILDREN flag, the child windows should be told to scroll along with everything else. This ought to put them in the right position.

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

Sidebar

Related Questions

I have a parent window and a few child windows attached to this. With
I have a main window in my project, and numerous other child widows inside
I have several child windows, all with the same parent. I want to cascade/tile
Possible Duplicate: Open child browser window from child window I have a list of
I have a button in a child window. If I am working in the
I have an application with an OpenGL window as a child window of the
Want to run javascript function from parent window in child window Example I have
I have a windows application with an MDI form and some child forms. I
I'm running into a problem where, I have a Window that contains a child
I have created a window whose handle is handle_parent. Then I created a child

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.