well, looks like ill be the first to post. in a wndproc, the wm_paint message. i want to know how many times the system sends that message a second.

also if it helps, does any one have a list of all* the messages and what they do, also like if they use wparam etc?
Posted on 2003-08-19 12:29:34 by Qages
(I don't know how this is related to OOP. Maybe mods will move the whole thread to appropriated section.)

Why don't you use a global variable to count how many times WM_PAINT comes in? That's the simplest way to profile.

And, there are many undocumented WM_xxxx which I happened to notice during debugging. Yes, I mean it, undocumented. You'll never know those messages unless you work for MS. :)
Posted on 2003-08-19 15:55:47 by Starless
in object-oriented programming we would have as many list objects(window) as needed. Instead of calling a procedure which we must provide with the correct list handle would directly send a message to the list object(wndproc) in question. Roughly speaking, each object implements its own module allowing for example many lists to coexist. my question about window message is oop :P
Posted on 2003-08-19 21:53:37 by Qages
WM_PAINT is only sent when the window needs to be painted, that is when it has been covered and then exposed by another object on the screen or there has been a change to the window or the window (or region of it) has been invalidated. If you do nothing on your PC and leave the window on top it will not recieve a WM_PAINT message at all (after the initial one). A list of messages is available as part of the SDK, there are thousands and each is detailed at MSDN and the SDK, most of the base messages are covered in the older win32.hlp file.
Posted on 2003-08-19 21:58:40 by donkey
Seem like this was the  last thread that was interested in paint.  Win32 made it so hard for posting these days.  I am not the bad guy.

May I ask a couple of questions without being put on the watch list or being mis-understood by the way i bbg?

I have implemented a shell hook that I O  to this community deep searching capability that I did for weeks. (ib386, YES, much slower than most)  Now the problem is when I click on any exe I get a flash and I see the borders of the window as I send even a simple message like ShowWindowHide.

Do to searching the board for solutions I realize that it?s about WM_PAINT and WM_NCPAINT but this is beyond me because some members talk about DC and such.  Now I confuse where to start without calling 42 or more api calls to avoid flashing of the screen because of first draw. Don?t think I didn?t goggle, finding c++ all over the place,  M$ notes including, masm32 (Icz only real hook).

I don't like googling it's all c
Posted on 2005-05-26 14:32:33 by ib386
ib386, to easily remove that flash, I do the following:  when registering a window class (with RegisterClassEx), in that WNDCLASSEX set the hbrBackground method to 0. Easy and effective.

This flashing problem is caused mostly by a few milliseconds' gap between the WM_ERASEBKGND and WM_PAINT. So, probably you should concentrate on the WM_ERASEBKGND .

42 APIs for simplest drawing...  huh. In GDI, I use no more than 8 API, and usually I stick to 10 WM_ msgs ;)
Posted on 2005-05-30 13:44:38 by Ultrano