
Window procedure, window class procedure and dialog procedure
Daqing,
Window procedure and window class procedure is - roughly - the same thing.
You can 'subclass' a window (Windows subclassing, not C++), then the window
class procedure will be called explicitly by your window procedure.
A dialog procedure is a special case of a window procedure.
For when they are called exactly, you - it is always your version being
called first, and the super-class called by you (even for dialogs).
The pointer to dialog procedures is stored with the other class/window data
(check SetClassLong and SetWindowLong).
A book on API-programming will clear all this up for you, such as Petzold's
excellent one. Beware if you are well entrenched in C++, the concept of
Window classes and subclassing is not the same.
Also note that the point is largely moot under MFC.
Johan Rosengren
Responable Informatique
PACTA S.A.
Quote:
> Dear experts:
> Could you help me with the relations between window procedure, window
class
> procedure and dialog procedure? i.e., exactly when are they called
> respectively? e.g., window procedure first then class procedure?
> More about dialog procedure, I knew Windows maintains structures for
window
> and window class respectively, and the pointers to their procedures are
> stored there. However, where is the pointer to dialog procedure stored?
How
> is it called?
> BTW, Is there any good books explaining this?
> Thanks
> Daqing