I have a dialog (this), I want to attach all subcontrols to it. Why would I write
Can you please add such an AttachControl() method? This will make porting MFC's DDX_Control() easier too.
This sort of thing comes down to personal preference. We can either have the dialog manage the controls, or the controls manage themselves. Having the controls (CWnd's) manage themselves is more consistent with the rest of Win32++ so I prefer the current approach. There is nothing to stop you from having a trivial wrapper for AttachDlgItem called AttachControl in your CDialog derived class if you prefer an alternate approach.
I've changed my mind and decided to add a method to CDialog called AttachItem after all.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.