[ttssh2-commit] [9949] HICON を解放するようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 5月 23日 (月) 22:59:11 JST


Revision: 9949
          https://osdn.net/projects/ttssh2/scm/svn/commits/9949
Author:   nmaya
Date:     2022-05-23 22:59:11 +0900 (Mon, 23 May 2022)
Log Message:
-----------
HICON を解放するようにした

cf. ttssh2-dev 405

Modified Paths:
--------------
    branches/adjust_icon/teraterm/keycode/keycode.c
    branches/adjust_icon/teraterm/teraterm/tekwin.cpp
    branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp

-------------- next part --------------
Modified: branches/adjust_icon/teraterm/keycode/keycode.c
===================================================================
--- branches/adjust_icon/teraterm/keycode/keycode.c	2022-05-23 12:51:03 UTC (rev 9948)
+++ branches/adjust_icon/teraterm/keycode/keycode.c	2022-05-23 13:59:11 UTC (rev 9949)
@@ -213,6 +213,12 @@
 	return TRUE;
 }
 
+LRESULT OnDestroy(HWND hWnd)
+{
+	TTSetIcon(ghInstance, hWnd, NULL, 0);
+	return TRUE;
+}
+
 LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
   LPARAM lParam)
 {
@@ -246,6 +252,7 @@
 			TimerProc(hWnd, wParam);
 			break;
 		case WM_DESTROY:
+			OnDestroy(hWnd);
 			PostQuitMessage(0);
 			break;
 		case WM_DPICHANGED:

Modified: branches/adjust_icon/teraterm/teraterm/tekwin.cpp
===================================================================
--- branches/adjust_icon/teraterm/teraterm/tekwin.cpp	2022-05-23 12:51:03 UTC (rev 9948)
+++ branches/adjust_icon/teraterm/teraterm/tekwin.cpp	2022-05-23 13:59:11 UTC (rev 9949)
@@ -292,6 +292,8 @@
 	HTEKWin = NULL;
 	pTEKWin = NULL;
 	ActiveWin = IdVT;
+
+	TTSetIcon(m_hInst, m_hWnd, NULL, 0);
 }
 
 void CTEKWindow::OnGetMinMaxInfo(MINMAXINFO *lpMMI)

Modified: branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp
===================================================================
--- branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp	2022-05-23 12:51:03 UTC (rev 9948)
+++ branches/adjust_icon/teraterm/ttpmacro/ttmmain.cpp	2022-05-23 13:59:11 UTC (rev 9949)
@@ -376,6 +376,8 @@
 
 	EndTTL();
 	EndDDE();
+	TTSetIcon(m_hInst, m_hWnd, NULL, 0);
+
 	::DestroyWindow(m_hStatus);
 }
 


ttssh2-commit メーリングリストの案内
Back to archive index