Registering Windows Win32 Classes

what is the best way to register window classes for a win32 program?

Are you registering each class in a WinMain function, or as needed?

0


a source to share


2 answers


I used them the way they are needed, you don't need to do this before you need them.



0


a source


There is no need to register if you are using MFC because this will run in the background .. but if you are using win32 you need to register the Windows class in the WNDCLASS structure, if you want to uise windproc to handle custom messages see the MSDN link

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633586(v=vs.85).aspx



even if you do not give the registration class, the system will have the class registered in the window.

see sample

0


a source







All Articles