Re: Scrolling window with child controls
From: vipin (vipin_at_nospam.com)
Date: 05/10/04
- Next message: Deepak: "Re: Help with dynamically changing checkbox text color"
- Previous message: Jugoslav Dujic: "Re: Scrolling window with child controls"
- In reply to: Gary Chanson: "Re: Scrolling window with child controls"
- Next in thread: Gary Chanson: "Re: Scrolling window with child controls"
- Reply: Gary Chanson: "Re: Scrolling window with child controls"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 May 2004 19:39:54 +0530
Hello,
Yes, MoveWindow with also works as expected but there is a problem
because I have to cache the control positions when I do a createwindow and
then move them relatively up or down the current thumb position. There looks
to be no api which will return the positions passed to CreateWindow at
runtime. GetclientRect(...) doesn't give me absolute position. There
appears no api to give the absolute postion.
If you speculate any issues I am going to fall into with this approach
please let me know the issues.I would make the changes to MoveWindow in
future though,looks like the better way out,though not for the time being.
thanks in advance.
vipin
"Gary Chanson" <gchanson@No.Spam.TheWorld.net> wrote in message
news:#VnTiJnNEHA.3572@tk2msftngp13.phx.gbl...
>
> "vipin" <vipin@nospam.com> wrote in message
> news:uTZhbnmNEHA.1956@TK2MSFTNGP10.phx.gbl...
> >
> > Hello,
> > I am not sure if there is a better way of implementing scroll for
a
> > window which has child control windows.
> >
> > The following is the sequence, I use to have the scrolls implemented
> > properly:-
> >
> >
> > WM_SIZE:
> >
> > DestroyWindows(...) // destroy previous child controls on the top level
> > window
> >
> > PostionWindows(...) // Use CreateWindow and then place the child
controls
> > in the main window. This means create control windows each time and
place
> > againon the client window,each time user resizes.
> >
> > SetScrollInfo(...) // Set the scroll range(maximum,page,etc)
> >
> >
> > I am aware of implementing the scroll if the window has some graphic
> > objects, in which case I can write the section of graphics objects into
> the
> > HDC in the WM_PAINT message. But I am not sure if the above approach is
> the
> > recommended way of having the scrolls implemented when controls are on
the
> > client window.
>
> Why don't you just move the controls to the position you're currently
> using for the new controls?
>
> --
> -GJC [MS Windows SDK MVP]
> -Software Consultant (Embedded systems and Real Time Controls)
> - http://www.mvps.org/ArcaneIncantations/consulting.htm
> -gchanson@mvps.org
>
- Next message: Deepak: "Re: Help with dynamically changing checkbox text color"
- Previous message: Jugoslav Dujic: "Re: Scrolling window with child controls"
- In reply to: Gary Chanson: "Re: Scrolling window with child controls"
- Next in thread: Gary Chanson: "Re: Scrolling window with child controls"
- Reply: Gary Chanson: "Re: Scrolling window with child controls"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|