I try to update an edit control's text, using it's added variable, which is a CString
but i'm failing it.
m_sNrAuto = "some text";
UpdateData(TRUE);
I also tried using UpdateWindow()
, but the edit control remains blank. I know i can do it by using SetWindowText()
, but i also saw some snippets where SetWindowText()
it's not used, the update is done by passing a value to an affiliated CString.
Try UpdateData(false);
true
means Control=>Data
false
means Data=>Control
Sometimes you have to do
UpdateData(true); // snapshot ALL controls data
m_sNrAuto = "some text"; // tweak the one you actually need updated
UpdateData(false); // this pushes ALL data, not just the one you tweaked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With