I am constructing a program using the Win32 Application on Visual Studio 2013. From the tutorials I have read, I know this following code is correct, but I don\'t know where
First and foremost, you need to decide what type of project you are trying to create with regard to character set. You have at least four options for project type
char)wchar_t)This is the decision that you have to make first. There's no point in proceeding before you make that decision.
Now, depending on the choice you made, you should proceed as follows
Regular char project
"Edit", 'A' etc.char, char [N], char * and std::string types to work with characters and stringsprintf, strcpy etc.CreateWindowEx, or their narrow names: CreateWindowExA (whichever you like better)Wide wchar_t project
L"Edit", L'A' etc.wchar_t, wchar_t [N], wchar_t * and std::wstring types to work with characters and stringswprintf, wcscpy etc.CreateWindowEx, or their wide names: CreateWindowExW (whichever you like better)"Transformer" project
into every translation unit_T with string and character literals: _T("Edit"), _T('A') etc.TCHAR, TCHAR [N], TCHAR * and std::basic_string types to work with characters and strings_tprintf, _tcscpy etc.CreateWindowEx
Mix-and-match project
Of course, if you started a project of type 1 or type 2, you can always turn it into a project of type 4 by starting to mix character types. But if you need a type 3 project, it is a good idea to stick to its principles from the very beginning (converting to type 3 later is a very laborious process).
It is not immediately obvious what you are trying to do in your project. But a wild guess would be that you are trying to build a type 1 project. In that case all you need to do to fix the problem is go to project settings and set "Character Set" to "Use Multi-Byte Character Set".