diff --git a/ReadMe.txt b/ReadMe.txt index 77c6163..726826c 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -207,3 +207,6 @@ TestRun在写入开机自启动项时先提升权限,以防止因权限不足 2019.5.7 1、添加对远程IP使用域名时的支持,若IP为域名,先将域名进行解析后再连接。 2、添加文档“使用花生壳.txt”,介绍了如何使用花生壳软件搭建远程监控系统。 + +2019.5.8 +优化左键点击Yama托盘图标的效果。 diff --git a/client/IOCPClient.cpp b/client/IOCPClient.cpp index 753def9..1c74ed9 100644 --- a/client/IOCPClient.cpp +++ b/client/IOCPClient.cpp @@ -91,6 +91,11 @@ IOCPClient::~IOCPClient() inline string GetIPAddress(const char *hostName) { struct hostent *host = gethostbyname(hostName); +#ifdef _DEBUG + printf("IPΪ: %s.\n", host->h_addrtype == AF_INET ? "IPV4" : "IPV6"); + for (int i = 0; host->h_addr_list[i]; ++i) + printf("ȡĵ%dIP: %s\n", i+1, inet_ntoa(*(struct in_addr*)host->h_addr_list[i])); +#endif return host ? inet_ntoa(*(struct in_addr*)host->h_addr_list[0]) : ""; } diff --git a/server/2015Remote/2015RemoteDlg.cpp b/server/2015Remote/2015RemoteDlg.cpp index 09dffab..0fc83aa 100644 --- a/server/2015Remote/2015RemoteDlg.cpp +++ b/server/2015Remote/2015RemoteDlg.cpp @@ -186,10 +186,15 @@ void CMy2015RemoteDlg::OnIconNotify(WPARAM wParam, LPARAM lParam) { switch ((UINT)lParam) { - case WM_LBUTTONDOWN: - case WM_LBUTTONDBLCLK: + case WM_LBUTTONDOWN: { - ShowWindow(IsWindowVisible() ? SW_HIDE : SW_SHOW); + if (IsIconic()) + { + ShowWindow(SW_NORMAL); + break; + } + ShowWindow(IsWindowVisible() ? SW_HIDE : SW_SHOWNORMAL); + SetForegroundWindow(); break; } case WM_RBUTTONDOWN: