Jump to content
  • Advertisement
Sign in to follow this  
Clash

Scrolling Listbox w/ Children Controls

This topic is 4618 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've subclassed a variable owner draw listbox. I programmatically add a bunch of controls (edit, combo, and buttons) as children of the listbox. I position the controls only one time - right after they are created as children. They only scroll properly when a single scroll occurs (i.e. clicking on the "scroll up or down" button). If the user tries to drag the thumb or use the mousewheel the children controls move to some really large y position (and it keeps growing everytime you track the scrollbar). So my question boils down to, how do you add a child control to a listbox and have it respond to all types of scrolling properly?

Share this post


Link to post
Share on other sites
Advertisement
Hello,

You could probably use the WM_MOUSEWHEEL message to handle the wheel scrolling and WM_KEYDOWN(test which key is being pressed) to handle the keyboard scrolling.

Hope that helps.

Richard

Share this post


Link to post
Share on other sites
The problem is that windows somehow automatically scrolls the children of a listbox. The way that it does it doesn't seem to work with how I'm adding children controls to the listbox.

I'm curious what I'm missing about how windows works.

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!