Answer the question
In order to leave comments, you need to log in
C++ how to make normal display of characters?
I need to find the NFSMW game window and get its PID, but the problem is that the window of this game contains the symbol ™, which is not displayed correctly in c++, how to fix it?
#include <iostream>
#include <Windows.h>
#include <string>
using namespace std;
int main()
{
DWORD pid;
LPCSTR WindowName = "Need for Speed™ Most Wanted";
HWND window = FindWindowA(0, WindowName);
GetWindowThreadProcessId(window, &pid);
cout<<window<<", "<<pid<<", "<<WindowName<<endl;
// Вывод: 0, 3, Need for SpeedтДв Most Wanted
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question