display a value in an EDITBOX
-
I'm using ADO to do a connection with Access database. I have a dlgbox with editbox which are linked to this app. When i do the loop:while(!pRs->EndOfFile) { if(m_dlglDate==rs.m_ch_RateDate) {....} I would like to return value in an editbox when my test "if" succeeded, so how could i do that? thanks in advance gerald :confused: X| :confused:
-
I'm using ADO to do a connection with Access database. I have a dlgbox with editbox which are linked to this app. When i do the loop:while(!pRs->EndOfFile) { if(m_dlglDate==rs.m_ch_RateDate) {....} I would like to return value in an editbox when my test "if" succeeded, so how could i do that? thanks in advance gerald :confused: X| :confused:
-
Do you mean, just pass a value into the editbox field? if so,I just use DDX & m_EditControl.SetWindowText("VALUE"); or SetDlgItemText(IDC_EDIT1,"VALUE"); Gerry.
yes, exactly, if i could find the value in the database i want to return it in the editbox, but it could be a COleDateTime or a double, so i believe that setwindowtext return string. How could i return a double value or a COleDateTime value in editbox?
-
yes, exactly, if i could find the value in the database i want to return it in the editbox, but it could be a COleDateTime or a double, so i believe that setwindowtext return string. How could i return a double value or a COleDateTime value in editbox?
There are plenty of ways to convert a double to a string. Function _ecvt for one. double to string pointer. As for COleDateTime, COleDateTime x(1999, 3, 19, 22, 15, 0); CString str = x.Format(_T("%A, %B %d, %Y")); m_EditBox.SetWindowText(str); Hope this helps.... Gerry.