8 #define ROTATTION_ANGLE 5 * M_PI / 180 10 extern HINSTANCE
hInst;
29 LRESULT CALLBACK
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
57 ->
display(20, 30, 0, 0, TEXT(
"LEGO"));
63 ->
display(95, 30, 0, 0, TEXT(
"DESIGNER"));
65 INITCOMMONCONTROLSEX init = {
sizeof(INITCOMMONCONTROLSEX), ICC_WIN95_CLASSES };
66 InitCommonControlsEx(&init);
82 ->
display(20, 335, 0, 0, TEXT(
"Color"));
88 ->
display(88, 330, 156, 363, NULL);
103 application->
call(*LoadFirst, 0);
112 SetCursor(LoadCursor(
nullptr, IDC_HAND));
121 SetCursor(LoadCursor(
nullptr, IDC_HAND));
127 SetCursor(LoadCursor(
nullptr, IDC_ARROW));
136 int wmId = LOWORD(wParam);
149 RedrawWindow(hWnd, NULL, 0, RDW_INVALIDATE);
170 application->
call(*addBrick, brickID-1);
171 application->
call(*actionDraw, 0);
183 application->
call(*rotatex, 0);
184 application->
call(*actionDraw, 0);
195 application->
call(*rotatex, 0);
196 application->
call(*actionDraw, 0);
207 application->
call(*rotatez, 0);
208 application->
call(*actionDraw, 0);
219 application->
call(*rotatez, 0);
220 application->
call(*actionDraw, 0);
231 application->
call(*rotateh, 0);
232 application->
call(*actionDraw, 0);
243 application->
call(*rotateh, 0);
244 application->
call(*actionDraw, 0);
255 application->
call(*rotatev, 0);
256 application->
call(*actionDraw, 0);
267 application->
call(*rotatev, 0);
268 application->
call(*actionDraw, 0);
275 return DefWindowProc(hWnd, message, wParam, lParam);
283 HDC hdc = BeginPaint(hWnd, &
ps);
286 application->
call(*actionDraw, 0);
294 return DefWindowProc(hWnd, message, wParam, lParam);
300 MultiByteToWideChar(0, 0, err.
what(), 255, msg, 256);
301 MessageBox(NULL, msg, TEXT(
"ERROR"), MB_OK);
URectangle * SetColor(COLORREF color)
void call(Action &act, int id)
URectangle * rectangle(int ID)
Editfield * editfield(int ID)
Application * application
Combobox * combobox(int ID)
Common draw interface class.
Main interface class. Provides access to create/remove/update elements.
BaseDrawInterface * drawUI
#define BTN_ADDBRICK_ACTIVE
HWND create(int X, int Y, int HEIGHT, int WIDTH, WCHAR *TEXT) override
URectangle * SetBorderWidth(int w)
Main drwa interface class. Provides access to create/remove/update elements.
URectangle * SetBorderColor(COLORREF color)
void addItem(WCHAR *item)
virtual const char * what() const =0
Text * SetColor(COLORREF color)
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Text * SetSymbolWidth(int w)
bool display(int X1, int Y1, int X2, int Y2, WCHAR *TEXT) override
bool display(int X1, int Y1, int X2, int Y2, WCHAR *TEXT) override
HWND create(int X, int Y, int HEIGHT, int WIDTH, WCHAR *TEXT) override