Garmaine Staff asked 2 years ago

I have a GUI project at work that uses MFC.

The widgets (controls) have message processing in a compile-time message map table.

I want to conditionally add controls to the form during runtime, but I'm stuck on how to append message handlers to the message map during runtime.

How do I add message handlers to the MFC message map during runtime?

Is there an alternate process that I should use?

See MFC Message Maps documentation for information about message maps.

Windows 7 or Windows 10 (The application works on both OS)
Visual Studio 2017