add edit control and static text dynamically to a dialog visual c++
I am quite new to vis开发者_高级运维ual c++. My problem is that I have a dialog where I have to display the default names of some shapes selected by user previously along with an edit control to allow the user to give user defined names to those shapes instead of default ones. The no.of static text and edit controls may change according to the user's previous selection.
Please provide me some ideas on how to do this in visual c++.
Thanks.
The easy way is to add as many as you might need and hide the ones you aren't using. Just make sure you handle them generically (it might help to have sequential item IDs in resource.h for each edit box) and it'll be easy to read (and write!) code.
精彩评论