aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadAd <adamgates84+github@gmail.com>2019-07-12 13:57:00 +1000
committerRadAd <adamgates84+github@gmail.com>2019-07-12 13:57:00 +1000
commitff198de91521e9c048670a18ec3df717b9dc7495 (patch)
tree8dd4d5182a71f662f6003b5b003fe2a64c87665f
parentf4020b76b769434920632947d4536b77b8b31a43 (diff)
downloadRadTerminal-ff198de91521e9c048670a18ec3df717b9dc7495.tar.gz
RadTerminal-ff198de91521e9c048670a18ec3df717b9dc7495.zip
Added an icon
-rw-r--r--RadTerminal.cpp4
-rw-r--r--RadTerminal.icobin0 -> 73070 bytes
-rw-r--r--RadTerminal.rcbin6640 -> 7202 bytes
-rw-r--r--RadTerminal.vcxproj3
-rw-r--r--RadTerminalFrame.cpp2
-rw-r--r--resource.hbin2558 -> 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
new file mode 100644
index 0000000..db38082
--- /dev/null
+++ b/RadTerminal.ico
Binary files differ
diff --git a/RadTerminal.rc b/RadTerminal.rc
index 5e289cf..f13d6d3 100644
--- a/RadTerminal.rc
+++ b/RadTerminal.rc
Binary files differ
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;
diff --git a/resource.h b/resource.h
index 64624e0..faf024e 100644
--- a/resource.h
+++ b/resource.h
Binary files differ