Sup
What i'm trying to do is a way to find a window though it's process ID, get the name of that window and change it to something that i want.
I found some things about that : ( Code 1 )
int WINAPI GetWindowText(
_In_ HWND hWnd,
_Out_ LPTSTR lpString,
_In_ int nMaxCount
);
this : ( Code 2 )
CWnd* pWnd = GetDlgItem(); GetDlgIt
pWnd->SetWindowText(_T("WindowName"));
CString str;
pWnd->GetWindowText(str);
ASSERT(str == _T("WindowName"));
and also this ( Code 3 )
HWND WindowHandel = FindWindowA(0, "WindowName");
DWORD proccesID = 0
GetWindowThreadProcessId(WindowHandel, &proccesID);
My questions are : How can i get the Process ID, get the window name of that process, put that so the codes can recognize Hwnd as my window name and change it for something that i want. Something like this :
Process = "anyprocess.exe"
Get Process ID <
Process ID = 1234567
Get window name from the ProcessID we have <
Window name = "ILoveYou"
Change "ILoveYou" to "IHaveYou"
And if i have more then one window with the same name, theres a way to check the first one opened so i don't change the other windows ?
In my head, taking the WindowName from the process id seems safer, the thing is that i don't wanna say to the code that i know the window name, i want it to find it and change it just like Liam Neeson did with those bad guys.
And i also would like to know more about using those "(0,...." or "(NULL,....", the "FindWindowA" command was just an example, i see this always and don't know how to use it properly :
FindWindowA(0, "WindowName")
An example of what i want would help me a lot =) Thanks for your patience.