34#define MAX_LOADSTRING 100
44LRESULT CALLBACK
WndProc(HWND,
UINT, WPARAM, LPARAM);
45LRESULT CALLBACK
About(HWND,
UINT, WPARAM, LPARAM);
52 unsigned argn,
const char *
const * argv)
54 if (strcmp(cmd,
"box"))
57 MessageBox(
NULL,
"Hello world!",
"Command",MB_OK);
61 virtual void Delete(
void) {
delete this; }
67 HINSTANCE hPrevInstance,
86 hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)
IDC_TEST2);
92 while (GetMessage(&
msg,
NULL, 0, 0))
94 if (!TranslateAccelerator(
msg.hwnd, hAccelTable, &
msg))
96 TranslateMessage(&
msg);
97 DispatchMessage(&
msg);
123 wcex.cbSize =
sizeof(WNDCLASSEX);
125 wcex.style = CS_HREDRAW | CS_VREDRAW;
126 wcex.lpfnWndProc = (WNDPROC)
WndProc;
129 wcex.hInstance = hInstance;
130 wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)
IDI_TEST2);
131 wcex.hCursor = LoadCursor(
NULL, IDC_ARROW);
132 wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
135 wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)
IDI_SMALL);
137 return RegisterClassEx(&wcex);
157 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
NULL,
NULL, hInstance,
NULL);
165 SetTimer(hWnd,1,100,
NULL);
167 ShowWindow(hWnd, nCmdShow);
183LRESULT CALLBACK
WndProc(HWND hWnd,
UINT message, WPARAM wParam, LPARAM lParam)
194 wmId = LOWORD(wParam);
195 wmEvent = HIWORD(wParam);
206 return DefWindowProc(hWnd, message, wParam, lParam);
210 hdc = BeginPaint(hWnd, &ps);
213 GetClientRect(hWnd, &rt);
214 DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
224 return DefWindowProc(hWnd, message, wParam, lParam);
230LRESULT CALLBACK
About(HWND hDlg,
UINT message, WPARAM wParam, LPARAM lParam)
238 if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
240 EndDialog(hDlg, LOWORD(wParam));
CommandMode
possible command modes
Debug module main class (singleton).
static void Command(const char *cmd)
Issues a debug command.
static void Update(void)
Update method, must be called on a regular basis.
virtual bool Execute(class Debug &dbg, const char *cmd, CommandMode cmdmode, unsigned argn, const char *const *argv)
Execute the given command.
virtual void Delete(void)
Destroys the current command interface.
int CALLBACK WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, int)
#define DEBUG_CREATE_COMMAND_GROUP(groupname, type)
TCHAR szTitle[MAX_LOADSTRING]
BOOL InitInstance(HINSTANCE, int)
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
ATOM MyRegisterClass(HINSTANCE hInstance)
TCHAR szWindowClass[MAX_LOADSTRING]
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM)