41 LRESULT CALLBACK
WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){
43 static bool bResizing =
false;
64 nMenuId = LOWORD(wParam);
92 SendMessage(hWnd, WM_CLOSE, 0, 0);
98 default:
return DefWindowProc(hWnd, message, wParam, lParam);
111 int WINAPI
wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR lpStr,
int nShow){
112 UNREFERENCED_PARAMETER(hPrev);
113 UNREFERENCED_PARAMETER(lpStr);
119 while(GetMessage(&msg,
nullptr, 0, 0)){
120 TranslateMessage(&msg);
121 DispatchMessage(&msg);
124 return (
int)msg.wParam;
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Window procedure.
void Draw(const TurtleDesc &d)
Draw turtle graphics.
void InitWindow(HINSTANCE hInst, INT nShow, WNDPROC WndProc)
Initialize window.
#define IDM_VIEW_THICKLINES
Menu id for thick lines.
Gdiplus::Bitmap * GetBitmap()
Get pointer to bitmap.
#define IDM_LSYS_BRANCHING
Menu id for branching structure.
#define IDM_FILE_QUIT
Menu id for Quit.
void MinDragRect(HWND hwnd, WPARAM wParam, RECT *pRect, int n)
Enforce minimum drag rectangle.
HRESULT SaveBitmap(HWND hwnd, Gdiplus::Bitmap *pBitmap)
Save bitmap to file.
static CMain * g_pMain
Pointer to the main class.
#define IDM_FILE_SAVE
Menu id for Save.
void Generate()
Generate L-system string.
void ToggleShowRules()
Toggle the show rules flag.
Interface for the main class CMain.
const bool IsStochastic() const
Is a stochastic L-system.
#define IDM_FILE_GENERATE
Menu id for Save.
#define IDM_LSYS_HEXGOSPER
Menu id for hexagonal Gosper curve.
void ToggleLineThickness()
Toggle the line thickness flag.
#define IDM_VIEW_RULES
Menu id for showing rules.
void OnPaint()
Paint the client area.
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR lpStr, int nShow)
Winmain.
void SetType(UINT t)
Set type.