From 5de975b03c7200cc66188a4b1a76e1213524975d Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Thu, 1 Nov 2018 20:56:56 -0700 Subject: pain and suffering, but I can read/write decorations & dots. --- Source/Main.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Source/Main.cpp') diff --git a/Source/Main.cpp b/Source/Main.cpp index 8336c77..8c4bf8c 100644 --- a/Source/Main.cpp +++ b/Source/Main.cpp @@ -6,13 +6,19 @@ #include "Randomizer.h" #include "Version.h" #include "Random.h" +#include "Panel.h" #define IDC_RANDOMIZE 0x401 #define IDC_TOGGLESPEED 0x402 #define IDC_SPEEDRUNNER 0x403 #define IDC_HARDMODE 0x404 +#define IDC_READ 0x405 +#define IDC_RANDOM 0x406 +#define IDC_WRITE 0x407 HWND hwndSeed, hwndRandomize; +int panel = 0x12C9; +std::shared_ptr _panel; LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -57,6 +63,15 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SetWindowText(hwndRandomize, L"Randomized!"); break; } + case IDC_READ: + _panel = std::make_shared(panel); + break; + case IDC_RANDOM: + _panel->Random(); + break; + case IDC_WRITE: + _panel->Write(panel); + break; } } return DefWindowProc(hwnd, message, wParam, lParam); @@ -99,6 +114,16 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 160, 10, 100, 26, hwnd, (HMENU)IDC_RANDOMIZE, hInstance, NULL); + CreateWindow(L"BUTTON", L"READ", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 100, 100, 26, hwnd, (HMENU)IDC_READ, hInstance, NULL); + CreateWindow(L"BUTTON", L"RANDOM", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 130, 100, 26, hwnd, (HMENU)IDC_RANDOM, hInstance, NULL); + CreateWindow(L"BUTTON", L"WRITE", + WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, + 160, 160, 100, 26, hwnd, (HMENU)IDC_WRITE, hInstance, NULL); + CreateWindow(L"BUTTON", L"", WS_VISIBLE | WS_CHILD | BS_CHECKBOX, 10, 52, 12, 12, hwnd, (HMENU)IDC_TOGGLESPEED, hInstance, NULL); -- cgit 1.4.1