1

I am quite new to visual 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.

1 Answer 1

1

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.

2
  • Thanks, Please give me an example. I have seen this as a solution when I searched in google. But did not find any example.
    – gishara
    Aug 3, 2011 at 4:10
  • ShowWindow(GetDlgItem(HDlg, YOURITEMID), SW_HIDE); // hide the window
    – noelicus
    Aug 3, 2011 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.