BOOL CALLBACK DlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM IParam) { //Variables for drawing in the dialog PAINTSTRUCT ps; HDC hdc; static int iSelection = IDM MAP1 ; HMENU hMenu; switch(Message) { hMenu = GetMenu (hwnd); case WM INITDIALOG: // This is where we set up the dialog box, and initialise any default values SetDlgItemlnt(hwnd, IDC_NUMBER, 2, FALSE); break; case WM PAINT: hdc = BeginPaint(hwnd, &ps); DrawGrid(hdc, hwnd); DrawMap(hdc, hwnd); if(SolutionFound) { DrawRobots(bestrobots, hdc, hwnd); DrawShadows(hdc, hwnd); } EndPaint(hwnd, &ps); break; case WM COMMAND: switch(LOWORD(wParam)) { case IDC SOLVE: { // When somebody clicks the Solve button, first we get the number