T.T.T.
T.T.T.

Reputation: 34623

How do I modify a MFC dialog member after it is created?

I used the Wizard to create a baisc input box with a OK and Cancel

I made the input box type "int" with min value 0 and max 99.

Now I want to edit the input box so that it is type string.

I have the MFC ClassWizard open and can see the ControlID, Type, and Member ID of the input box. However, there is no option to edit it...

How can I do this through the Wizard and not mess up the nicely generated code?

Thanks!

Visual Studio 6.0 - C++

Upvotes: 0

Views: 242

Answers (1)

Jerry Coffin
Jerry Coffin

Reputation: 490728

The easiest way is probably to delete the variable that's currently associated with the control (using the ClassWizard, and deleting the function implementation by hand) and then creating a new variable to associate with it of type CString. Note that, for better or worse, you will not be able to limit the string to a numeric range -- you can only limit its length.

Upvotes: 2

Related Questions