Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- BOOL CALLBACK EnumWindowsProc(_In_ HWND hwnd, _In_ LPARAM lParam)
- {
- DWORD pid;
- GetWindowThreadProcessId(hwnd, &pid);
- if (pid == 2324)
- {
- auto result = SetWindowPos(hwnd, 0, 400, 400, 400, 400, 0);
- if (result == 0)
- {
- cout << "Error " << GetLastError() << endl;
- }
- }
- return TRUE;
- }
- int main()
- {
- EnumWindows(EnumWindowsProc, 0);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement