Click here to Skip to main content
15,313,293 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can I take an information from an static variable?
I have an edit box that it has a text in itself and I wanna use this text and have it in another variable for example in an string form, so what should I do to solve my proplem?
Updated 19-Oct-11 7:23am
Sergey Alexandrovich Kryukov 19-Oct-11 13:23pm
Not clear. Sounds like not that you misunderstand "static variable" but just "variable". What is "take information from... variable"? Variable already has it "taken"... :-)
If you realize yourself what's your real problem you click use "Improve question" above and write about it. :-)
Mehdi Gholam 19-Oct-11 13:24pm
EDIT -> removed extra formating
Mehdi Gholam 19-Oct-11 13:36pm
Sorry c++ is not my forte!

1 solution

Assuming we are talking about a MFC edit box CEdit[^] and you have a variable connected to the resource.

You can use the GetWindowText[^] function.
CString editBoxString;

Richard MacCutchan 19-Oct-11 17:43pm
I think you hit the nail on the head.
André Kraak 19-Oct-11 17:48pm
Thank you, the question was not much to go on.
sarah.wilson 20-Oct-11 3:37am
tnx all to help. :-)
sarah.wilson 20-Oct-11 4:56am
have you ever seen the link:(
it has a txt control named(CStaticmCtrl_StaticEditor;).
I wanna read this txt and save it in a string variable to use it.
what should I do know?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900