copying textbox information
-
i have a form having five different textboxes in vc++, and i need to copy all integer values from this textboxes to a 2d array. how can i do this. please help. thanks.
-
i have a form having five different textboxes in vc++, and i need to copy all integer values from this textboxes to a 2d array. how can i do this. please help. thanks.
CWnd::GetWindowText() / WM_GETTEXT to get the text from the control Some version of strtol() to convert a string to an integer The assignment operator (=) to assign the integer to the array. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
CWnd::GetWindowText() / WM_GETTEXT to get the text from the control Some version of strtol() to convert a string to an integer The assignment operator (=) to assign the integer to the array. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
sorry it isnt not clear enough. can you give me more getails. thanks
-
sorry it isnt not clear enough. can you give me more getails. thanks
Which part? Getting text from controls? Converting text to integer? Copying an integer to an integer array? Are you using MFC or straight Win32 APIs? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Which part? Getting text from controls? Converting text to integer? Copying an integer to an integer array? Are you using MFC or straight Win32 APIs? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
i know how i can convert to integer. i use "Convert::Toint32" and i alsoo know how i can copy an integer to an array. iwould like to know getting text from controls. i am trying to create windows form application
-
i have a form having five different textboxes in vc++, and i need to copy all integer values from this textboxes to a 2d array. how can i do this. please help. thanks.
What do you mean by "textbox"? Is it a static control, edit control, listbox control?
-
What do you mean by "textbox"? Is it a static control, edit control, listbox control?
i meant a listbox
-
i meant a listbox
Are you using MFC?
-
Are you using MFC?
no i am using CLR
-
i know how i can convert to integer. i use "Convert::Toint32" and i alsoo know how i can copy an integer to an array. iwould like to know getting text from controls. i am trying to create windows form application
Ohhh it's a managed c++ app. You're in the wrong forum to start with. The TextBox class has a property called Text. If you have a TextBox object for the edit control, you can get its text with this property:
System::Windows::Forms::TextBox ^MyTextBox = ...;
...
int MyInt = Convert::ToInt32(MyTextBox->Text);Mark *edit* fixed wrong operator
Last modified: 11mins after originally posted --
Mark Salsbery Microsoft MVP - Visual C++ :java: