FAQ Database Discussion Community


Create a control dynamically in an MFC application

c++,visual-studio-2013,mfc,cdialog
According to this link from Microsoft, it should be possible to define a CButton and specify its parent window (CDialog) without having the CButton as a member of the Dialog, but I couldn't do it. So if myButton is a member of a CDialog-derived (myCDialog) class, the following code works:...