SoundGraphAccess.cpp
changeset 8 3031cd3ebd1e
parent 7 ad71cf47d037
child 11 1bf32325a98b
     1.1 --- a/SoundGraphAccess.cpp	Sat Apr 13 00:45:13 2013 +0200
     1.2 +++ b/SoundGraphAccess.cpp	Sun Apr 14 22:40:46 2013 +0200
     1.3 @@ -193,12 +193,23 @@
     1.4  
     1.5  		//Convert first line
     1.6  		OutputDebugStringA(gTextFirstLine);
     1.7 -		int convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextFirstLine, -1, gTextFirstLine16, sizeof(gTextFirstLine16));
     1.8 -		OutputDebugString(gTextFirstLine16);
     1.9 +		//int convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextFirstLine, -1, gTextFirstLine16, sizeof(gTextFirstLine16));
    1.10 +		for (int i=0;i<=strlen(gTextFirstLine);i++)
    1.11 +			{
    1.12 +			unsigned char myChar=(unsigned char)gTextFirstLine[i];
    1.13 +			gTextFirstLine16[i]=myChar;
    1.14 +			}
    1.15 +		OutputDebugStringW(gTextFirstLine16);
    1.16  		//Convert second line
    1.17  		OutputDebugStringA(gTextSecondLine);
    1.18 -		convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextSecondLine, -1, gTextSecondLine16, sizeof(gTextSecondLine16));
    1.19 -		OutputDebugString(gTextSecondLine16);
    1.20 +		//convertedChars = MultiByteToWideChar(CP_UTF8, 0, gTextSecondLine, -1, gTextSecondLine16, sizeof(gTextSecondLine16));
    1.21 +		for (int i=0;i<=strlen(gTextSecondLine);i++)
    1.22 +			{
    1.23 +			unsigned char myChar=(unsigned char)gTextSecondLine[i];
    1.24 +			gTextSecondLine16[i]=myChar;
    1.25 +			}
    1.26 +
    1.27 +		OutputDebugStringW(gTextSecondLine16);
    1.28  
    1.29  		//IMON API call need to be done from window thread for some reason
    1.30  		SendMessageToServer(KRspPending);
    1.31 @@ -555,7 +566,11 @@
    1.32  		break;
    1.33  	//
    1.34  	case WM_IMON_DISPLAY_SET_VFD_TEXT:
    1.35 +#ifdef _UNICODE
    1.36  		if (DSP_SUCCEEDED==IMON_Display_SetVfdText(gTextFirstLine16,gTextSecondLine16))
    1.37 +#else
    1.38 +		if (DSP_SUCCEEDED==IMON_Display_SetVfdText(gTextFirstLine,gTextSecondLine))
    1.39 +#endif
    1.40  			{
    1.41  			SendMessageToServer(KRspDone);
    1.42  			}