how can i make sure that when i transfer Minesweeper it will be in unicode and not will be casted to ASCII?
HWND procHnd;
HWND windowHnd=FindWindow(NULL,"Minesweeper");
does it matter at all the name of the process or window representation?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can explicitly use the Unicode version of the API
You are currently building your application for ANSI characters. If you want to use Unicode throughout you should change your project options to use Unicode. If you did that you can simply write it as
Windows API functions that have parameters which contain text are available in two versions, an ANSI version and a Unicode version. For example the user32 DLL does not export a function called
FindWindow. Instead it exportsFindWindowA, the ANSI version, andFindWindowW, the Unicode version. Macros in the Windows header files convertFindWindowinto eitherFindWindowAorFindWindowW, depending on which character set you target.In Visual Studio you can set this option in the project configuration under Configuration Properties | General | Character Set. Select Use Unicode Character Set.