- // character is added afterwards (Could have used ttip.Left(tipLength)
- // and a cchMultiByte parameter of tipLength+1, but this is more
- //efficient.
- ::MultiByteToWideChar(CP_ACP, 0, ttip, tipLength,
- (wchar_t *)ttText->szText,
- sizeof(ttText->szText) / sizeof(wchar_t));
+ // character is added afterwards (this is more efficient).
+ ::MultiByteToWideChar(CP_ACP, 0, ttip, tipLength, buf, MAX_LENGTH);