views:

21

answers:

1

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++

+2  A: 

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.

Jerry Coffin