|
From: Vlada D. <dj...@im...> - 2002-09-24 12:38:20
|
Hello, list I wrote a program for drawing in a window( nothing special, just colord lines). It works fine, but, when I minimize the window, and then restore it, the lines are gone. I suppose that when I restore the window from minimized state, a WM_PAINT message is posted. Is this correct? Is there some API function which can restore the contents of the window in response to this message or I have to do it myself? |
|
From: Per W. <pw...@ia...> - 2002-09-24 12:45:24
|
Sorry. Either perform all drawing to a bitmap that may be blitted back to the window on a WM_PAINT, or keep a list of all draw operations, and replay the list. The OS does not keep track of the contents of the windows. /Per W On Tue, 24 Sep 2002, Vlada Djurovic wrote: > Hello, list > I wrote a program for drawing in a window( nothing special, just colord > lines). It works fine, but, when I minimize the window, and then restore > it, the lines are gone. I suppose that when I restore the window from > minimized state, a WM_PAINT message is posted. Is this correct? Is there > some API function which can restore the contents of the window in > response to this message or I have to do it myself? > |
|
From: Vlada D. <dj...@im...> - 2002-09-25 13:36:22
|
I'm having some problems with this, because the program "freezes" when I use WM_PAINT. Is this message generated when dialog box pops up in front of the window or when I draw line with the mouse? Is there some other message that causes window to redraw its content? -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Per Westermark Sent: utorak, 24. septembar 2002 14:45 To: Vlada Djurovic Cc: DevC++ help Subject: Re: [Dev-C++] restoring window Sorry. Either perform all drawing to a bitmap that may be blitted back to the window on a WM_PAINT, or keep a list of all draw operations, and replay the list. The OS does not keep track of the contents of the windows. /Per W On Tue, 24 Sep 2002, Vlada Djurovic wrote: > Hello, list > I wrote a program for drawing in a window( nothing special, just colord > lines). It works fine, but, when I minimize the window, and then restore > it, the lines are gone. I suppose that when I restore the window from > minimized state, a WM_PAINT message is posted. Is this correct? Is there > some API function which can restore the contents of the window in > response to this message or I have to do it myself? > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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 |
|
From: Per W. <pw...@ia...> - 2002-09-25 14:23:17
|
WM_PAINT isn't used when drawing new information to a window. It's used when RE-drawing. After a window has been hidden, and later are showed again, it will receive a WM_PAINT message, to redraw the previously hidden area. The normal drawing for paint canvas is performed by hooking the mouse messages. /Per W On Wed, 25 Sep 2002, Vlada Djurovic wrote: > I'm having some problems with this, because the program "freezes" when I > use WM_PAINT. Is this message generated when dialog box pops up in front > of the window or when I draw line with the mouse? Is there some other > message that causes window to redraw its content? > > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Per > Westermark > Sent: utorak, 24. septembar 2002 14:45 > To: Vlada Djurovic > Cc: DevC++ help > Subject: Re: [Dev-C++] restoring window > > Sorry. > > Either perform all drawing to a bitmap that may be blitted back to the > window on a WM_PAINT, or keep a list of all draw operations, and replay > the list. The OS does not keep track of the contents of the windows. > > /Per W > > > On Tue, 24 Sep 2002, Vlada Djurovic wrote: > > > Hello, list > > I wrote a program for drawing in a window( nothing special, just > colord > > lines). It works fine, but, when I minimize the window, and then > restore > > it, the lines are gone. I suppose that when I restore the window from > > minimized state, a WM_PAINT message is posted. Is this correct? Is > there > > some API function which can restore the contents of the window in > > response to this message or I have to do it myself? > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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 > |
|
From: <ste...@ge...> - 2002-09-25 14:28:53
|
----- Original Message -----
From: "Vlada Djurovic" <dj...@im...>
To: "'Per Westermark'" <pw...@ia...>
Cc: "'DevC++ help'" <dev...@li...>
Sent: Wednesday, September 25, 2002 3:36 PM
Subject: RE: [Dev-C++] restoring window
> I'm having some problems with this, because the program "freezes" when I
> use WM_PAINT. Is this message generated when dialog box pops up in front
> of the window or when I draw line with the mouse? Is there some other
> message that causes window to redraw its content?
Also when moving then window outside the screen ;)
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Per
> Westermark
> Sent: utorak, 24. septembar 2002 14:45
> To: Vlada Djurovic
> Cc: DevC++ help
> Subject: Re: [Dev-C++] restoring window
>
> Sorry.
>
> Either perform all drawing to a bitmap that may be blitted back to the
> window on a WM_PAINT, or keep a list of all draw operations, and replay
> the list. The OS does not keep track of the contents of the windows.
>
> /Per W
>
>
> On Tue, 24 Sep 2002, Vlada Djurovic wrote:
>
> > Hello, list
> > I wrote a program for drawing in a window( nothing special, just
> colord
> > lines). It works fine, but, when I minimize the window, and then
> restore
> > it, the lines are gone. I suppose that when I restore the window from
> > minimized state, a WM_PAINT message is posted. Is this correct? Is
> there
> > some API function which can restore the contents of the window in
> > response to this message or I have to do it myself?
Stein Nygård - http://steinware.dk
lapido, ergo sum
|
|
From: Abhijit S. <mu...@gm...> - 2002-09-25 15:13:14
|
----- Original Message ----- From: Vlada Djurovic To: DevC++ help Sent: Tuesday, September 24, 2002 6:08 PM Subject: [Dev-C++] restoring window Hello, list I wrote a program for drawing in a window( nothing special, just colord lines). It works fine, but, when I minimize the window, and then restore it, the lines are gone. I suppose that when I restore the window from minimized state, a WM_PAINT message is posted. Is this correct? Is there some API function which can restore the contents of the window in response to this message or I have to do it myself? ---------------------- You can force a redraw when you receive WM_SIZE messages, by calling InvalidateRect() or InvalidateRgn(). ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |