-
January 23rd, 2007, 03:29 AM
#1
disappear when scrolling out of the original display window
hi there,
I've a problem here. I've created a custom contro with CWnd based class with scrolling. I've also create 2 buttons, 1 for drawing a graph and another to draw the gridlines. However, when i display both of them, the gridlines only will be drawn in the original window(not include the covered area of the scrolling window). Apart from that,once i scroll out of the original window area, the gridlines also disappear. Can anybody guide me on how to solve this problem??
Thanks
Last edited by cyn8; January 23rd, 2007 at 03:46 AM.
-
January 23rd, 2007, 06:01 AM
#2
Re: disappear when scrolling out of the original display window
--- Can u plz give us some more information as to what u are tryign to do ?
If u scroll the previous data is lost, unless u just redraw every thing in the ondraw().
better way is to maintain the data state in the doc class, and implement your drawing function in the onDraw(). this way u will draw only what is necessary in the right coordinates.
If you found my reply to be useful, please dont hesitate to rate it.
DO NOT kick the Axe if it doesnt fall on your foot.
Salman
-
January 23rd, 2007, 09:53 PM
#3
Re: disappear when scrolling out of the original display window
in my program, there is an if statement in OnPaint. If a certain button is clicked, maybe bClicked=TRUE.
then in OnPaint,
if(bClicked==TRUE) DrawSomething();
However, if i include bClicked=FALSE; after the DrawSomething(),the drawings displayed in the covered area of the window will not be displayed when scrolling.
What is causing this to happen?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|