我有如下的程序段
_variant_t vID = m_pRecordset->GetCollect("ID");
现在我想在一个editbox里面显示vID的值该怎么办?
editbox的ID是IDC_ID,为int型,变量定义为m_nID谢谢高人指点!
_variant_t vID = m_pRecordset->GetCollect("ID");
现在我想在一个editbox里面显示vID的值该怎么办?
editbox的ID是IDC_ID,为int型,变量定义为m_nID谢谢高人指点!
m_nID=vID.intVal;
然后调用:UpdateData(false);让editbox显视数据即可。
CWnd::SetDlgItemText
void SetDlgItemText( int nID, LPCTSTR lpszString );ParametersnIDIdentifies the control whose text is to be set.lpszStringPoints to a CString object or null-terminated string that contains the text to be copied to the control.ResSets the caption or text of a control owned by a window or dialog box.