Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LRESULT CALLBACK WndProc
- (
- HWND hWnd,
- UINT message,
- WPARAM wParam,
- LPARAM lParam
- )
- {
- int wmId, wmEvent;
- PAINTSTRUCT ps;
- HDC hdc;
- static unsigned int total_count_child = 0;
- static unsigned int move_count_child = 0;
- static unsigned int rclick_count_child = 0;
- static unsigned int mclick_count_child = 0;
- static unsigned int lclick_count_child = 0;
- total_count_child++;
- TCHAR Тoutput[100];
- WCHAR Woutput[100];
- char output[100];
- char movem[100];
- switch (message)
- {
- case WM_COMMAND:
- wmId = LOWORD(wParam);
- wmEvent = HIWORD(wParam);
- switch (wmId)
- {
- case IDM_ABOUT:
- DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
- break;
- case IDM_EXIT:
- DestroyWindow(hWnd);
- break;
- default:
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- break;
- case WM_PAINT:
- hdc = BeginPaint(hWnd, &ps);
- EndPaint(hWnd, &ps);
- break;
- case WM_DESTROY:
- _stprintf(Тoutput, _T("\n\n======CHILD======\n\nОбщо = %u , Move = %lu, Rclk = %u , Mclk = %u, Lclk = %hu\n"), total_count_child, move_count_child, rclick_count_child, mclick_count_child, lclick_count_child);
- OutputDebugString(Тoutput);
- _stprintf(Тoutput, _T("Total = %u , Move = %lu, Rclk = %u , Mclk = %u, Lclk = %hu\n"), total_count_child, move_count_child, rclick_count_child, mclick_count_child, lclick_count_child);
- OutputDebugString(Тoutput);
- sprintf(output, "Total = %u , Move = %lu, Rclk = %u , Mclk = %u, Lclk = %hu\n", total_count_child, move_count_child, rclick_count_child, mclick_count_child, lclick_count_child);
- OutputDebugStringA(output);
- swprintf(Woutput, sizeof(Woutput), L"Общо = %u , Move = %lu, Rclk = %u , Mclk = %u, Lclk = %hu\n", total_count_child, move_count_child, rclick_count_child, mclick_count_child, lclick_count_child);
- OutputDebugStringW(Woutput);
- PostQuitMessage(0);
- break;
- case WM_MOUSEMOVE:
- move_count_child++;
- sprintf(movem, "move = %u\n", move_count_child);
- OutputDebugStringA(movem);
- return DefWindowProc(hWnd, message, wParam, lParam);
- break;
- case WM_LBUTTONDOWN:
- lclick_count_child++;return DefWindowProc(hWnd, message, wParam, lParam);break;
- case WM_RBUTTONDOWN:
- rclick_count_child++;return DefWindowProc(hWnd, message, wParam, lParam);break;
- case WM_MBUTTONDOWN:
- mclick_count_child++;return DefWindowProc(hWnd, message, wParam, lParam);break;
- default:
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement