diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-30 19:33:40 -0700 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-30 19:33:40 -0700 |
commit | 3ef50b71d80683dc60c83153c48fb6c14915bf04 (patch) | |
tree | da4a20847479d5524a14ff3d3df321c227a118ab /Source | |
parent | 90e7d97170bb4e1be5385d2df6c8a796b6a9304c (diff) | |
download | witness-tutorializer-3ef50b71d80683dc60c83153c48fb6c14915bf04.tar.gz witness-tutorializer-3ef50b71d80683dc60c83153c48fb6c14915bf04.tar.bz2 witness-tutorializer-3ef50b71d80683dc60c83153c48fb6c14915bf04.zip |
On to actual stuff now
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Main.cpp | 29 | ||||
-rw-r--r-- | Source/Version.h | 3 | ||||
-rw-r--r-- | Source/Version.rc | 1 |
3 files changed, 11 insertions, 22 deletions
diff --git a/Source/Main.cpp b/Source/Main.cpp index c7b4e69..b4aba0d 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp | |||
@@ -1,12 +1,10 @@ | |||
1 | // Source.cpp : Defines the entry point for the application. | ||
2 | // | ||
3 | |||
4 | #include "resource.h" | 1 | #include "resource.h" |
5 | #include <Richedit.h> | 2 | #include <Richedit.h> |
6 | #include <ctime> | 3 | #include <ctime> |
7 | #include <string> | 4 | #include <string> |
8 | #include "Randomizer.h" | 5 | #include "Randomizer.h" |
9 | #include "windows.h" | 6 | #include "windows.h" |
7 | #include "Version.h" | ||
10 | 8 | ||
11 | #define IDC_RANDOMIZE 0x401 | 9 | #define IDC_RANDOMIZE 0x401 |
12 | #define IDC_TOGGLESPEED 0x402 | 10 | #define IDC_TOGGLESPEED 0x402 |
@@ -65,34 +63,25 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
65 | 63 | ||
66 | int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) | 64 | int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) |
67 | { | 65 | { |
68 | #define MAX_LOADSTRING 100 | 66 | LoadLibrary(L"Msftedit.dll"); |
69 | WCHAR szWindowClass[MAX_LOADSTRING]; | ||
70 | LoadStringW(hInstance, IDC_SOURCE, szWindowClass, MAX_LOADSTRING); | ||
71 | 67 | ||
72 | WNDCLASSEXW wcex = { | 68 | WNDCLASSW wndClass = { |
73 | sizeof(WNDCLASSEX), | ||
74 | CS_HREDRAW | CS_VREDRAW, | 69 | CS_HREDRAW | CS_VREDRAW, |
75 | WndProc, | 70 | WndProc, |
76 | 0, | 71 | 0, |
77 | 0, | 72 | 0, |
78 | hInstance, | 73 | hInstance, |
79 | LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SOURCE)), | 74 | NULL, |
80 | LoadCursor(nullptr, IDC_ARROW), | 75 | LoadCursor(nullptr, IDC_ARROW), |
81 | (HBRUSH)(COLOR_WINDOW+1), | 76 | (HBRUSH)(COLOR_WINDOW+1), |
82 | MAKEINTRESOURCEW(IDC_SOURCE), | 77 | WINDOW_CLASS, |
83 | szWindowClass, | 78 | WINDOW_CLASS, |
84 | LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)), | ||
85 | }; | 79 | }; |
86 | RegisterClassExW(&wcex); | 80 | RegisterClassW(&wndClass); |
87 | 81 | ||
88 | WCHAR szTitle[MAX_LOADSTRING]; | 82 | HWND hwnd = CreateWindow(WINDOW_CLASS, PRODUCT_NAME, WS_OVERLAPPEDWINDOW, |
89 | LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); | ||
90 | HWND hwnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, | ||
91 | 400, 200, 500, 500, nullptr, nullptr, hInstance, nullptr); | 83 | 400, 200, 500, 500, nullptr, nullptr, hInstance, nullptr); |
92 | 84 | ||
93 | LoadLibrary(L"Msftedit.dll"); | ||
94 | |||
95 | |||
96 | CreateWindow(L"STATIC", L"Enter a seed:", | 85 | CreateWindow(L"STATIC", L"Enter a seed:", |
97 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, | 86 | WS_TABSTOP | WS_VISIBLE | WS_CHILD | SS_LEFT, |
98 | 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); | 87 | 10, 15, 90, 16, hwnd, NULL, hInstance, NULL); |
diff --git a/Source/Version.h b/Source/Version.h index 088b618..cd79def 100644 --- a/Source/Version.h +++ b/Source/Version.h | |||
@@ -9,4 +9,5 @@ | |||
9 | #define TO_STRING(s) #s | 9 | #define TO_STRING(s) #s |
10 | #define VERSION_STR TO_STRING(MAJOR) "." TO_STRING(MINOR) "." TO_STRING(PATCH) ".0" | 10 | #define VERSION_STR TO_STRING(MAJOR) "." TO_STRING(MINOR) "." TO_STRING(PATCH) ".0" |
11 | 11 | ||
12 | #define PRODUCT_NAME "Witness Randomizer" | 12 | #define PRODUCT_NAME L"Witness Randomizer" |
13 | #define WINDOW_CLASS L"WitnessRandomizer" | ||
diff --git a/Source/Version.rc b/Source/Version.rc index 6ee5076..fe44a47 100644 --- a/Source/Version.rc +++ b/Source/Version.rc | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | STRINGTABLE | 6 | STRINGTABLE |
7 | BEGIN | 7 | BEGIN |
8 | IDS_APP_TITLE "Witness Randomizer" | ||
9 | IDC_SOURCE "SOURCE" | 8 | IDC_SOURCE "SOURCE" |
10 | END | 9 | END |
11 | 10 | ||