Which class implements the role of the WinMain() function?
-
CWnd class
-
CWinApp class
-
CWinThread class
-
None of the above
B
Correct answer
Explanation
CWinApp encapsulates the WinMain() functionality in MFC applications - it initializes the application, processes the message loop, and handles cleanup. Each MFC app has exactly one CWinApp-derived object. CWnd handles window functionality, CWinThread manages threads, and CWinApp actually contains the application's entry point logic.