HWND hwnd = FindWindow(NULL, L"计算器");
if (hwnd == NULL) {
std::cout << "未扎到相关程序的句柄,这里创建程序" << std::endl;
}
else {
std::cout << "找到相关句柄" << std::endl;
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
ShowWindow(hwnd, SW_SHOWNORMAL);
SetForegroundWindow(hwnd);
SetFocus(hwnd);
std::cout << "修改成功" << std::endl;
ReleaseDC(hwnd, NULL);
}