by Dan East » Jun 27, 2001 @ 6:27pm
As Fredrick basically said, you need to pass a UNICODE string instead of ASCII. You can place an L in front of the string, but I greatly prefer using the _T( "" ) macro instead because it follows standard C syntax which looks and makes more sense than using the L macro. The following are are methods of forcing the compiler to convert a string to unicode:<br>_T( "my string" ), L"my string", _TEXT( "my string" )<br>Using the L macro is also more "dangerous" in that it always converts to a Unicode string. _T and _TEXT will only convert the string if you are building a Unicode app, which makes your code more portable. If you use the L macro then you should not use _t functions. You should use the _w family instead since you are specifically using only wide-character strings.<br><br>You do not use the SND_FILENAME flag. sndPlaySound will load the file if that is what your string refers to.<br><br>Dan East<br><br>Friggen smileys: Last modification: Dan East - 06/27/01 at 15:27:48