Window procedure, window class procedure and dialog procedure 
Author Message
 Window procedure, window class procedure and dialog procedure

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



Tue, 17 Dec 2002 03:00:00 GMT  
 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



Fri, 20 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling Window Class procedures from an OLE_HANDLE

2. Procedure Reference problem - cannot convert from 'ref System.Windows.Forms.Data

3. Help! Using a virtual function as windows procedure

4. How to change window procedure dynamically?

5. Window procedure

6. The MFC Window Procedure

7. Is it Possible to Intsall Procedure by c# on Windows 98

8. Control Class STATIC message procedure?

9. ATL Consumer Wizard Generated Classes for executing stored procedures

10. Calling stored procedure using CDatabase class

11. MFC ODBC classes and Stored Procedures

12. Calling Oracle stored procedures using MFC's classes

 

 
Powered by phpBB® Forum Software