Matthew Smith
March 30th, 1999, 11:45 PM
Hi, I have the following few lines in my program, that get called in OnInitialUpdate() for a RichEditView doc/view app.
CHARFORMAT cfm;
cfm.cbSize = sizeof(cfm);
cfm.dwMask = CFM_FACE | CFM_BOLD;
cfm.dwEffects = CFE_BOLD;
_tcscpy(cfm.szFaceName, _T("Arial"));
theCtrl.SetDefaultCharFormat(cfm);
When compiling with _UNICODE, that code fails on the _tcscpy line, with the following error:
error C2664: 'wcscpy' : cannot convert parameter 1 from 'char [32]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
How can I get this to work with _UNICODE?
thanks,
-Matt
CHARFORMAT cfm;
cfm.cbSize = sizeof(cfm);
cfm.dwMask = CFM_FACE | CFM_BOLD;
cfm.dwEffects = CFE_BOLD;
_tcscpy(cfm.szFaceName, _T("Arial"));
theCtrl.SetDefaultCharFormat(cfm);
When compiling with _UNICODE, that code fails on the _tcscpy line, with the following error:
error C2664: 'wcscpy' : cannot convert parameter 1 from 'char [32]' to 'unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
How can I get this to work with _UNICODE?
thanks,
-Matt