diff options
author | RadAd <adamgates84+github@gmail.com> | 2019-07-12 13:57:00 +1000 |
---|---|---|
committer | RadAd <adamgates84+github@gmail.com> | 2019-07-12 13:57:00 +1000 |
commit | ff198de91521e9c048670a18ec3df717b9dc7495 (patch) | |
tree | 8dd4d5182a71f662f6003b5b003fe2a64c87665f | |
parent | f4020b76b769434920632947d4536b77b8b31a43 (diff) | |
download | RadTerminal-ff198de91521e9c048670a18ec3df717b9dc7495.tar.gz RadTerminal-ff198de91521e9c048670a18ec3df717b9dc7495.zip |
Added an icon
-rw-r--r-- | RadTerminal.cpp | 4 | ||||
-rw-r--r-- | RadTerminal.ico | bin | 0 -> 73070 bytes | |||
-rw-r--r-- | RadTerminal.rc | bin | 6640 -> 7202 bytes | |||
-rw-r--r-- | RadTerminal.vcxproj | 3 | ||||
-rw-r--r-- | RadTerminalFrame.cpp | 2 | ||||
-rw-r--r-- | resource.h | bin | 2558 -> 2648 bytes |
6 files changed, 7 insertions, 2 deletions
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 Binary files differnew file mode 100644 index 0000000..db38082 --- /dev/null +++ b/RadTerminal.ico diff --git a/RadTerminal.rc b/RadTerminal.rc Binary files differindex 5e289cf..f13d6d3 100644 --- a/RadTerminal.rc +++ b/RadTerminal.rc diff --git a/RadTerminal.vcxproj b/RadTerminal.vcxproj index f517f98..9b27af0 100644 --- a/RadTerminal.vcxproj +++ b/RadTerminal.vcxproj @@ -111,6 +111,9 @@ <ItemGroup> <ResourceCompile Include="RadTerminal.rc" /> </ItemGroup> + <ItemGroup> + <Image Include="RadTerminal.ico" /> + </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> 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; Binary files differ |