Registering Windows Classes Win32

2019-08-21 03:59发布

what's the best practise for registering window classes for a win32 program?

Do you register every class in the WinMain function or as they're required?

2条回答
小情绪 Triste *
2楼-- · 2019-08-21 04:38

No Need of registering if you using MFC because this will be doing in the backgrounds.. but if using win32 you need to register a windows class in WNDCLASS structure if you want to uise a windproc for your custom message handling see the MSDN link

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

even if you dont give a registerclass the system will be having a class that is registered with the window.

see the sample

查看更多
3楼-- · 2019-08-21 04:48

I used to do them as they're required, no need doing it before they're needed.

查看更多
登录 后发表回答