CString 转换成VARIANT类型

CString strVar = _T("hello");

VARIANT varValue;

varValue.vt=VT_BSTR;

varValue.bstrVal=(_bstr_t)strVar;


m_ctlSpread.SetText( varValue);

你可能感兴趣的:(CString,variant)