Skip to content

Commit

Permalink
Ver2.6.3_repair
Browse files Browse the repository at this point in the history
  • Loading branch information
zouhuidong authored Jul 12, 2022
1 parent 05b6e0d commit c598a87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/EasyWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ EASY_WIN32_BEGIN
int g_nSysW = 0, g_nSysH = 0; // 系统分辨率

HWND g_hConsole; // 控制台句柄
HINSTANCE g_hInstance; // 程序实例
HINSTANCE g_hInstance // 程序实例
= GetModuleHandle(0);

HICON g_hIconDefault; // 默认程序图标
int g_nCustomIcon = 0; // 自定义程序图标资源 ID,为 0 表示不使用
Expand Down Expand Up @@ -828,7 +829,6 @@ void InitWindow(int w, int h, int flag, LPCTSTR strWndTitle, bool(*WindowProcess
// 注册窗口类
RegisterWndClass();
g_hConsole = GetConsoleWindow();
g_hInstance = GetModuleHandle(0);

// 隐藏控制台
if (g_hConsole)
Expand Down Expand Up @@ -932,7 +932,7 @@ void InitWindow(int w, int h, int flag, LPCTSTR strWndTitle, bool(*WindowProcess
// 必须在显示窗口前标记已经完成创建窗口。
// 因为可以在自定义过程函数中创建子窗口,若是不在显示窗口前标记窗口创建完成,
// 就会导致父窗口过程函数阻塞,接下来显示窗口就会阻塞,进而导致整个窗口假死。
*nDoneFlag = 1;
*nDoneFlag = 1;

//** 显示窗口等后续处理 **//

Expand Down

0 comments on commit c598a87

Please sign in to comment.