dynamically create controls and attaching listeners to them?
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I don't know if this is super-easy to accomplish, I am pretty new to VC++/MFC.. I need to create a dialog which must contain a different number of CButton controls depending on certain state parameters of the applications. So I need to dynamically create a number of those controls and attach a message handler for them ( they all share the same message handler code ). How do I attach this listener function to the controls once I've created them? (I destroy all buttons and create a bunch of new ones when the layout changes) thankful for any help.