本文整理汇总了C++中CDevice::OnMouseUp方法的典型用法代码示例。如果您正苦于以下问题:C++ CDevice::OnMouseUp方法的具体用法?C++ CDevice::OnMouseUp怎么用?C++ CDevice::OnMouseUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDevice
的用法示例。
在下文中一共展示了CDevice::OnMouseUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WndProc
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
static HANDLE hDrawThread = NULL;
static HANDLE hAppThread = NULL;
switch (message)
{
case WM_CHAR:
if (wParam == VK_ESCAPE)
PostQuitMessage(0);
break;
case WM_KEYDOWN:
g_dev.OnKeyDown( (int)wParam );
break;
case WM_KEYUP:
g_dev.OnKeyUp( (int)wParam );
break;
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
g_dev.Blit( hdc );
EndPaint(hWnd, &ps);
break;
case WM_CREATE:
{
g_running = TRUE;
_ASSERT( g_app );
hDrawThread = CreateThread( NULL, NULL, &ThreadProcDraw, NULL, NULL, NULL );
hAppThread = CreateThread( NULL, NULL, &ThreadProcApp, NULL, NULL, NULL );
break;
}
case WM_CLOSE:
g_running = FALSE;
Sleep(10);
DestroyWindow(hWnd);
break;
case WM_DESTROY:
TerminateThread( hDrawThread, 1 );
TerminateThread( hAppThread, 1 );
PostQuitMessage(0);
break;
case WM_MOUSEMOVE:
g_dev.OnMouseMove(LOWORD(lParam), HIWORD(lParam));
break;
case WM_LBUTTONDOWN:
g_dev.OnMouseDown();
break;
case WM_LBUTTONUP:
g_dev.OnMouseUp();
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}