PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

error with messagebox

Code:
dwError = GetLastError();
sprintf(sMsg, "SetupComm failed: Port=%s Error=%d",
m_sComPort, dwError);
AfxMessageBox(sMsg);


hi,

always get error:
>error C2665: 'AfxMessageBox' : none of the 2 overloads can convert parameter 1 from type 'char [512]'<

thanks nio

Windows CE uses UNICODE. You are trying to pass an ANSI string to AfxMessageBox. You must use the type TCHAR or WCHAR instead of char.

Dan East