fix(Console): Issue with disabling the close button of console (#479)

This commit is contained in:
Yimura 2022-10-19 20:24:43 +02:00 committed by GitHub
parent 7ca0eacd98
commit 6489969c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID)
file_manager_instance->get_project_file("./cout.log")
);
EnableMenuItem(GetSystemMenu(FindWindowA(NULL, "YimMenu"), 0), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
EnableMenuItem(GetSystemMenu(GetConsoleWindow(), 0), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
try
{