I have the following code:
MessageBox(NULL, NULL, (LPCWSTR)FindWindow(NULL, L"Untitled - Notepad"), MB_OK);
How can i make the messagebox's title be the Window Handle to notepad? Is there any effiecient and simple way to do this using c++?
I have the following code:
MessageBox(NULL, NULL, (LPCWSTR)FindWindow(NULL, L"Untitled - Notepad"), MB_OK);
How can i make the messagebox's title be the Window Handle to notepad? Is there any effiecient and simple way to do this using c++?
This:
HWND hwnd = FindWindowW(NULL, L"Untitled - Notepad");
std::wostringstream ss;
ss << std::hex << hwnd;
std::wstring strTitle = ss.str();
MessageBoxW(NULL, L"Caption message", strTitle.c_str(), MB_OK);