Skip to content

Commit 99b1ae5

Browse files
committed
fixed:hide window is incorrent for windows
1 parent 40893e2 commit 99b1ae5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ int main(int argc, char** argv)
166166
if (st_ServiceConfig.bHideWnd)
167167
{
168168
#ifdef _MSC_BUILD
169-
LPCXSTR lpszWndName = _X("XEngine_DeamonApp");
170-
SetConsoleTitleA(lpszWndName);
171-
HWND hWnd = FindWindowA(NULL, lpszWndName);
172-
169+
HWND hWnd = GetConsoleWindow();
173170
if (NULL == hWnd)
174171
{
175172
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,设置窗口隐藏失败,没有找到句柄"));

0 commit comments

Comments
 (0)