Saturday, February 22, 2020

tips on MFC project compiling

tips on MFC project compiling. one tip is how to use comctl32.dll. I read some reminders on the book "MFC from ground up", such as we must invoke initinstance(). this post explains why.

  1. When a MessageBox in InitInstance Didn't Show
  2. So to conclude, what I learned because of message box problem is:

    1. Whether or not you are using Manifest file, you should call InitCommonControls() or InitCommonControlsEx().
    2. MFC42.dll has set COMCTL32.DLL to delay load. ( But when I checked in MFC8.dll, the delayed loading of COMCTL32 is removed )
    3. If we use manifest file, COMCTL32.DLL will be doing the registration of all System Classes instead of user32.dll. So it is necessary to ensure that COMCTL32.DLL has loaded before you create a window belonging to system class.


No comments:

Post a Comment