Re: Scroll dialog programmatically
- From: TJ <someone@xxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 23:24:00 -0500
Have you tried simulating a key press on the control you want to have focus?
SendMessage(hcontrol,WM_KEYUP,(WPARAM)VK_UP,0);
Lisa Pearlson wrote:
My dialog resource has WS_VSCROLL, .. I can't get everything to fit on the screen so my dialog displays a scroll bar. When I set focus to a control outside the visible area, using the key pads, the control scrolls into view.
But when I set focus programmatically to a control outside the visible area (using SetFocus()) then the dialog doesn't scroll.
I want to scroll back to top.
I tried to use SetScrollPos() and it adjusts the scroll bar only, but doesn't scroll the dialog box content.
I tried posting WM_VSCROLL to the dialog box itself, but nothing happens.
Any clues?
Lisa
.
- Follow-Ups:
- Re: Scroll dialog programmatically
- From: Lisa Pearlson
- Re: Scroll dialog programmatically
- References:
- Scroll dialog programmatically
- From: Lisa Pearlson
- Scroll dialog programmatically
- Prev by Date: Re: How to check trust level of my code?
- Next by Date: Re: SYSTEMTIME and Conversion
- Previous by thread: Scroll dialog programmatically
- Next by thread: Re: Scroll dialog programmatically
- Index(es):
Relevant Pages
|