Wang Tiling
A Simple Wang Tiling Generator
WindowsHelpers.h
Go to the documentation of this file.
1
6
7// MIT License
8//
9// Copyright (c) 2020 Ian Parberry
10//
11// Permission is hereby granted, free of charge, to any person obtaining a copy
12// of this software and associated documentation files (the "Software"), to
13// deal in the Software without restriction, including without limitation the
14// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15// sell copies of the Software, and to permit persons to whom the Software is
16// furnished to do so, subject to the following conditions:
17//
18// The above copyright notice and this permission notice shall be included in
19// all copies or substantial portions of the Software.
20//
21// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27// IN THE SOFTWARE.
28
29#ifndef __WINDOWSHELPERS_H__
30#define __WINDOWSHELPERS_H__
31
32#include "Includes.h"
33
35// Menu IDs
36
37#pragma region Menu IDs
38
39#define IDM_FILE_GENERATE 1
40#define IDM_FILE_SAVE 2
41#define IDM_FILE_QUIT 3
42
43#define IDM_TILESET_DEFAULT 4
44#define IDM_TILESET_FLOWER 5
45#define IDM_TILESET_MUD 6
46#define IDM_TILESET_GRASS 7
47
48#define IDM_HELP_HELP 8
49#define IDM_HELP_ABOUT 9
50
51#pragma endregion Menu IDs
52
54// Helper functions
55
56#pragma region Helper functions
57
58//initialization functions
59
60void InitWindow(HINSTANCE, INT, WNDPROC);
61ULONG_PTR InitGDIPlus();
62
63//others
64
65HRESULT SaveBitmap(HWND, Gdiplus::Bitmap*);
66
67#pragma endregion Helper functions
68
70// Menu functions
71
72#pragma region Menu functions
73
74void CreateFileMenu(HMENU hParent);
75HMENU CreateTilesetMenu(HMENU hParent);
76void CreateHelpMenu(HMENU hParent);
77
78#pragma endregion Menu functions
79
80#endif //__WINDOWSHELPERS_H__
Useful includes.
HRESULT SaveBitmap(HWND, Gdiplus::Bitmap *)
Save bitmap to file.
HMENU CreateTilesetMenu(HMENU hParent)
Create Tileset menu.
void CreateFileMenu(HMENU hParent)
Create File menu.
ULONG_PTR InitGDIPlus()
Initialize GDI+.
void CreateHelpMenu(HMENU hParent)
Create Help menu.
void InitWindow(HINSTANCE, INT, WNDPROC)
Initialize window.