Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  w
Language: C/C++
Code:
#include <iostream>
#include <windows.h>
 
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
    DWORD dwProcessId;
    GetWindowThreadProcessId(hWnd, &dwProcessId);
    if (dwProcessId == (DWORD)lParam)
        ShowWindow(hWnd, SW_MAXIMIZE);
    return TRUE;
}
 
int main()
{
    DWORD dwProcessPid = 2580; // Your PID
    EnumWindows(EnumWindowsProc, (LPARAM)dwProcessPid);
    std::cin.get();
    return 0;
}
          
Comments: