Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Dyanamically create controls
I have a big question for Visual C++ not sure where it goes...I want to find out how to create controls dynamically. The number of Edit controls needed is not known until runtime..
In a simple example...say you have a dialog box with 1 Edit control and 1 Button control...enter a number in the Edit control and once you click the Button, the number you entered will be the number of Edit controls to appear in the dialog..
This would only occur only once each time it was run..
I figure that I will have a CEdit array(member of the dialogs class?) that is initialized at runtime...I found that a CDialog object has a CreateControl(CWnd::CreateControl) method but the parameters are a little confusing...any suggestions would be appreciated...thanks..
0 · ·