I think it's because you are painting within the WM_PAINT message.
WM_PAINT is triggered when something needs repainting, a window moving,
screen updates whatever - and if you are drawing within that message you
trigger another, another etc.
Remember to use BeginPaint and EndPaint function calls to sandwich your
drawing code.
I hope this helps, I'm a bit rusty with Windows.
>From: "Jorge Abramian" <jab...@ma...>
>Reply-To: <jab...@ma...>
>To: <dev...@li...>
>Subject: [Dev-C++] Resizing windows
>Date: Mon, 17 Mar 2003 06:47:59 -0500
>
>Hi, I am new here and this is my problem:
>
>1) I am developing a simple program to show some formatted data on the
>screen (ASCII X; Y).
>2) Everything is ok until I resize the screen, then it goes white.
>3) if I trap the WM_PAINT message and set UpdateWindow(), then the screen
>starts up gray.
>4) I tried to use within WM_PAINT, Beginpaint, Getclientrect, Fillrect, to
>bring back the whith color of the child window. But it didn't work.
>
>5) the data I need to show is:
>
>if(Number_of_Points!=0)
> {
> for (loop=0; loop<Number_of_Points; loop++)
> {
> sprintf (temp,"%6.2f",x[loop]);
> sprintf (temp2,"%6.2f",y[loop]);
> TextOut(hdc, 2,line,temp, 6);
> TextOut(hdc, 80, line,temp2,6);
> paintline+=13;
> }
> }
>
>
>Any clues? Example codes? tutorials? HELPP!!!!!!!! and then thanks.
>
>je
>
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by:Crypto Challenge is now open!
>Get cracking and register here for some mind boggling fun and
>the chance of winning an Apple iPod:
>http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk
|