LRESULT CALLBACK WndProc (HWND hWnd, UINT Message,
			 WPARAM wParam, LPARAM lParam)
{
    switch(Message)
    {
	case WM_COMMAND:
	    return DoWMCommand(wParam, hWnd);

	case WM_LBUTTONDOWN:
	    DoLButtonDown(hWnd,lParam);
	    break;

	case WM_LBUTTONUP:
	    DoLButtonUp(hWnd,lParam);
	    break;

	case WM_MOUSEMOVE:
	    DoMouseMove(hWnd,lParam);
	    break;

	case WM_PAINT:
	    DoPaint(hWnd);
	    break;

	case WM_DESTROY:
	    PostQuitMessage(0);
	    break;

	default:
	    return DefWindowProc(hWnd,Message,wParam,lParam);
    }
    return 0;
}
Beispiel #2
0
//
/// Responds to a mouse button-up message by calling DoLButtonUp. If DoLButtonUp
/// does not return IsComplete, EvLButtonUp calls TWindow::EvLButtonUp.
//
void
TTinyCaption::EvLButtonUp(uint modKeys, const TPoint& pt)
{
    // If we're still in area where buton went down, then do it
    //
    if (DoLButtonUp(modKeys, pt) == esPartial)
        TWindow::EvLButtonUp(modKeys, pt);
}