How to Update the Dialog in SDI
-
created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing How to do this?
-
Exceter wrote: retrieved the data in CString I suppose this is the CString from the edit box ? Exceter wrote: I tried UpdateData(), Did you try UpdateData(TRUE) or UpdateData(FALSE) ? ~RaGE();
-
I tried both of them UpdateData(TRUE) and UpdateData(FALSE) my CString (CString MyStr) object is of EditBox. I checked the MyStr with AfxMessageBox, it catches the data
Exceter wrote: I checked the MyStr with AfxMessageBox, it catches the data :confused: very odd ... well I'm not 100% sure about it since I always work with controls, never with straight values, but
UpdateData(FALSE)
should have done it. Try to create a control member datam_EditBox
with the class wizard, and set the text withm_EditBox.SetWindowText(MyStr);
. If it is still not updating it, then the display refreshing must hang in another part of your code. (You could also first try aRedrawWindow()
after theUpdateData(FALSE)
). ~RaGE();