1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
LRESULT CALLBACK newEditProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
case WM_KEYDOWN:
MessageBox(hwnd,"KEY", "KEY", MB_OK | MB_ICONINFORMATION);
return 0;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_XBUTTONDOWN:
case WM_RBUTTONDOWN:
SendMessage(HWND_KEY,WM_SETTEXT,0,(LPARAM)"GIVEFOCUS!!!");
SetFocus(HWND_KEY);
return 0;
default:
if (oldEditProcedure) {
return CallWindowProc (oldEditProcedure, hwnd, message, wParam, lParam);
} else {
return DefWindowProc (hwnd, message, wParam, lParam);
}
}
}
|