183 个问题
您好,
#include <windows.h>
int main () {
HWND hwnd = GetConsoleWindow ();
Sleep (10);
HWND owner = GetWindow (hwnd, GW_OWNER);
if (owner == NULL) {
// Windows 10
}
else {
// Windows 11
ShowWindow (owner, SW_MAXIMIZE);
}
}
如果答案是正确的,请点击“接受答案”并点赞。 如果您对此答案还有其他疑问,请点击“评论”。
注意:如果您想接收相关电子邮件,请按照我们的文档中的步骤启用电子邮件通知 此线程的通知。