Ejemplo n.º 1
0
static BOOL Video_OnSetCursor(HWND hWindow, HWND hWndCursor, UINT codeHitTest, UINT msg)
/***********************************************************************/
{
	LPVIDEO lpVideo;
	RECT rWindow;
	POINT pt;
	int x, y;

	if ( hWndCursor != hWindow ) // not in our window
		return( FALSE );

	if ( !(lpVideo = (LPVIDEO)GetWindowLong( hWindow, GWL_DATAPTR )) )
		return( FALSE );

	GetCursorPos( &pt );
	ScreenToClient( hWindow, &pt );
	GetClientRect( hWindow, &rWindow );
	x = (pt.x * 10) / RectWidth( &rWindow );
	y = (pt.y * 10) / RectHeight( &rWindow );

	if ( PtInHotspot( lpVideo, x, y, NO ) )
		{
		SetCursor( LoadCursor( GetApp()->GetInstance(), MAKEINTRESOURCE(IDC_HAND_POINT_CURSOR) ) );
		return( TRUE );
		}

	return( FORWARD_WM_SETCURSOR(hWindow, hWndCursor, codeHitTest, msg, DefWindowProc) );
}
Ejemplo n.º 2
0
		static BOOL guiOnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg)
		{
			POINT p;

			if (hwnd == hwndCursor && codeHitTest == HTCLIENT) {
				GetCursorPos(&p);
				ScreenToClient(hwnd, &p);
				if (PtInRect(&gui.rectHDivider, p))
					SetCursor(LoadCursor(0, IDC_SIZENS));

				return TRUE;
			}

			return FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, DefWindowProc);
		}
Ejemplo n.º 3
0
LOCAL BOOL Story_OnSetCursor(HWND hWindow, HWND hWndCursor, UINT codeHitTest, UINT msg)
/***********************************************************************/
{
	PSTORY pStory = GetStory(hWindow);
	if (pStory)
	{	
		POINT CursorPos;

		GetCursorPos( &CursorPos );
		ScreenToClient( hWindow, &CursorPos );
		if (pStory->FindHotSpot(CursorPos.x, CursorPos.y) >= 0)
		{
			SetCursor(pStory->m_hHotSpotCursor);
			return(TRUE);
		}
	}
	return FORWARD_WM_SETCURSOR(hWindow, hWndCursor, codeHitTest, msg, DefWindowProc);
}
Ejemplo n.º 4
0
LOCAL BOOL ZoomBox_OnSetCursor(HWND hWnd, HWND hWndCursor, UINT codeHitTest,
							UINT msg)
/************************************************************************/
{
    CPoint pt;
    HWND hChild;

    // check for disabled control
    GetCursorPos( &pt );
    if( hChild = MyChildWindowFromPoint( hWndCursor, pt ))
    {
        hWndCursor = hChild;
    }

    if ( SetupCursor( hWndCursor, codeHitTest, IDD_ZOOMBOX ))
	    return( TRUE );

    return FORWARD_WM_SETCURSOR(hWnd, hWndCursor, codeHitTest, msg,
							    ZoomBox_DefProc);
}