From ff198de91521e9c048670a18ec3df717b9dc7495 Mon Sep 17 00:00:00 2001 From: RadAd Date: Fri, 12 Jul 2019 13:57:00 +1000 Subject: Added an icon --- RadTerminal.cpp | 4 +++- RadTerminal.ico | Bin 0 -> 73070 bytes RadTerminal.rc | Bin 6640 -> 7202 bytes RadTerminal.vcxproj | 3 +++ RadTerminalFrame.cpp | 2 +- resource.h | Bin 2558 -> 2648 bytes 6 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 RadTerminal.ico diff --git a/RadTerminal.cpp b/RadTerminal.cpp index 918b6c8..012888e 100644 --- a/RadTerminal.cpp +++ b/RadTerminal.cpp @@ -72,7 +72,7 @@ ATOM RegisterRadTerminal(HINSTANCE hInstance) WNDCLASS wc = {}; wc.lpfnWndProc = RadTerminalWindowProc; - wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); wc.hCursor = LoadCursor(NULL, IDC_ARROW); //wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW); wc.hInstance = hInstance; @@ -282,6 +282,7 @@ void ReadThread(HANDLE hHandle, HWND hWnd) break; SendMessage(hWnd, WM_READ, (WPARAM) buf, read); } + CloseHandle(hHandle); } void tsm_log(void *data, @@ -718,6 +719,7 @@ BOOL RadTerminalWindowOnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct) CreateThread(WatchThread, data->spd.pi.hProcess, hWnd); CreateThread(ReadThread, data->spd.hOutput, hWnd); + data->spd.hOutput = NULL; // TODO Report error int e = 0; diff --git a/RadTerminal.ico b/RadTerminal.ico new file mode 100644 index 0000000..db38082 Binary files /dev/null and b/RadTerminal.ico differ diff --git a/RadTerminal.rc b/RadTerminal.rc index 5e289cf..f13d6d3 100644 Binary files a/RadTerminal.rc and b/RadTerminal.rc differ diff --git a/RadTerminal.vcxproj b/RadTerminal.vcxproj index f517f98..9b27af0 100644 --- a/RadTerminal.vcxproj +++ b/RadTerminal.vcxproj @@ -111,6 +111,9 @@ + + + diff --git a/RadTerminalFrame.cpp b/RadTerminalFrame.cpp index e605da8..defcd0e 100644 --- a/RadTerminalFrame.cpp +++ b/RadTerminalFrame.cpp @@ -13,7 +13,7 @@ HWND CreateRadTerminalFrame(HINSTANCE hInstance, int nCmdShow) WNDCLASS wcMDIFrame = {}; wcMDIFrame.lpfnWndProc = RadTerminalMDIFrameProc; - wcMDIFrame.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wcMDIFrame.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1)); wcMDIFrame.hCursor = LoadCursor(NULL, IDC_ARROW); //wcMDIFrame.hbrBackground = GetSysColorBrush(COLOR_WINDOW); wcMDIFrame.hInstance = hInstance; diff --git a/resource.h b/resource.h index 64624e0..faf024e 100644 Binary files a/resource.h and b/resource.h differ -- cgit v1.2.3