diff --git a/MandelbrotCpp.cpp b/MandelbrotCpp.cpp index ee05590..0cb27e2 100644 --- a/MandelbrotCpp.cpp +++ b/MandelbrotCpp.cpp @@ -684,8 +684,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) switch (wmId) { case IDM_ABOUT: - DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); - break; + { + DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); + } + break; case ID_ALGORITHM_MANDELBROT: { useMandelbrotMath = true; @@ -693,7 +695,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) recalculate(hWnd); updateMenuChecks(hWnd); } - break; + break; case ID_ALGORITHM_JULIA: { useMandelbrotMath = false; @@ -701,17 +703,47 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) recalculate(hWnd); updateMenuChecks(hWnd); } - break; + break; case ID_FILE_RESETZOOM: + { resetZoom(hWnd); recalculate(hWnd); - break; + } + break; case ID_FILE_SAVEIMAGE: + { saveBitmap(hWnd); - break; + } + break; case IDM_EXIT: - DestroyWindow(hWnd); - break; + { + DestroyWindow(hWnd); + } + break; + case ID_MAXITERATIONS_3: + { + maxIteration = 3; + recalculate(hWnd); + } + break; + case ID_MAXITERATIONS_5: + { + maxIteration = 5; + recalculate(hWnd); + } + break; + case ID_MAXITERATIONS_10: + { + maxIteration = 10; + recalculate(hWnd); + } + break; + case ID_MAXITERATIONS_15: + { + maxIteration = 15; + recalculate(hWnd); + } + break; case ID_MAXITERATIONS_25: { maxIteration = 25; diff --git a/MandelbrotCpp.rc b/MandelbrotCpp.rc index ffdc993..36e355f 100644 Binary files a/MandelbrotCpp.rc and b/MandelbrotCpp.rc differ diff --git a/resource.h b/resource.h index 133775b..58bd867 100644 --- a/resource.h +++ b/resource.h @@ -23,6 +23,11 @@ #define ID_MAXITERATIONS_1000000 32779 #define ID_MAXITERATIONS_25 32780 #define ID_MAXITERATIONS_50 32781 +#define ID_ZOOMLEVEL 32782 +#define ID_MAXITERATIONS_15 32783 +#define ID_MAXITERATIONS_10 32784 +#define ID_MAXITERATIONS_5 32785 +#define ID_MAXITERATIONS_3 32786 #define IDC_STATIC -1 // Next default values for new objects @@ -31,7 +36,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 129 -#define _APS_NEXT_COMMAND_VALUE 32782 +#define _APS_NEXT_COMMAND_VALUE 32787 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 111 #endif