当前位置: 首页>>代码示例>>C++>>正文


C++ OnLButtonDown函数代码示例

本文整理汇总了C++中OnLButtonDown函数的典型用法代码示例。如果您正苦于以下问题:C++ OnLButtonDown函数的具体用法?C++ OnLButtonDown怎么用?C++ OnLButtonDown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OnLButtonDown函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnLButtonDown

void CSkinButton::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	if ( nChar == VK_SPACE )
		OnLButtonDown( 0, 0 );
	//CButton::OnKeyDown(nChar, nRepCnt, nFlags);
}
开发者ID:mikesimb,项目名称:SkinDemo2,代码行数:7,代码来源:SkinButton.cpp

示例2: switch

LRESULT CCharacterProcess::DefMainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch ( uMsg )
	{
		case WM_LBUTTONDOWN:
			OnLButtonDown(wParam, lParam);
			break;
		case WM_LBUTTONUP:
			OnLButtonUp(wParam, lParam);
			break;
		case ID_SOCKCLIENT_EVENT_MSG:
			g_xClientSocket.OnSocketMessage(wParam, lParam);
			break;
		case WM_KEYDOWN:
			OnKeyDown(wParam, lParam);
			break;
		case WM_MOUSEON:
			OnMouseOn(wParam,lParam);
			break;
		case WM_MOVE:
			OnWindowMove(wParam,lParam);
			break;
		case WM_MOUSEMOVE:
			OnMouseMove(wParam,lParam);
			break;
		default:
			break;
	}
	return CWHDefProcess::DefMainWndProc(hWnd, uMsg, wParam, lParam);
}
开发者ID:KaSt,项目名称:LegendOfMir3_Src,代码行数:30,代码来源:CharacterProcess.cpp

示例3: switch

LRESULT CALLBACK HexGrid::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg){
	case WM_CREATE:
		OnCreate(hWnd, uMsg, wParam, lParam);
		break;
	case WM_PAINT:
		OnPaint(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SETFONT:
		OnSetFont(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SIZE:
		OnSize(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		OnLButtonDown(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONUP:
		OnLButtonUp(hWnd, uMsg, wParam, lParam);
		break;
	case WM_MOUSEMOVE:
		OnMouseMove(hWnd, uMsg, wParam, lParam);
		break;
	case WM_VSCROLL:
		OnVScroll(hWnd, uMsg, wParam, lParam);
		break;

	default:
		return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}
	return 0;
}
开发者ID:csersoft,项目名称:hard86,代码行数:33,代码来源:hexgrid.cpp

示例4: switch

LRESULT CDreamSkinSpinCtrl::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
	LRESULT nResult = ERROR_SUCCESS;

	switch(message)
	{
	case WM_ERASEBKGND:
		break;
	case WM_LBUTTONDBLCLK:
		nResult = ::SendMessageW(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		nResult = OnLButtonDown(wParam, MAKEPOINTS(lParam));
		break;
	case WM_LBUTTONUP:
		nResult = OnLButtonUp(wParam, MAKEPOINTS(lParam));
		break;
	case WM_MOUSELEAVE:
		nResult = OnMouseLeave();
		break;
	case WM_MOUSEMOVE:
		nResult = OnMouseMove(wParam, MAKEPOINTS(lParam));
		break;
	case WM_PAINT:
		nResult = OnPaint();
		break;
	default:
		nResult = CDreamSkinWindow::DefWindowProc(message, wParam, lParam);
	}

	return nResult;
}
开发者ID:zephyrer,项目名称:dreamskin,代码行数:32,代码来源:DreamSkinSpinCtrl.cpp

示例5: WndProc

//窗口处理函数
LRESULT CALLBACK WndProc( HWND hWnd, UINT msg, 
												 WPARAM wParam, LPARAM lParam )
{
	switch( msg )
	{
		case WM_MOUSEWHEEL:
			OnMouseWheel( hWnd, wParam );
			break;
		case WM_LBUTTONDBLCLK:
			OnLButtonDblClk( hWnd );
			break;
		case WM_PAINT:
			OnPaint( hWnd );
			break;
		case WM_MOUSEMOVE:
			OnMouseMove( hWnd, lParam );
			break;
		case WM_LBUTTONDOWN:
			OnLButtonDown( hWnd, wParam, lParam );
			break;
		case WM_LBUTTONUP:
			OnLButtonUp( hWnd, wParam, lParam );
			break;
		case WM_DESTROY:
			PostQuitMessage( 0 );
			break;
	}
	return DefWindowProc( hWnd, msg, wParam, lParam );
}
开发者ID:zxwbj,项目名称:danei,代码行数:30,代码来源:WinMouse.cpp

示例6: switch

	//--------------------------------------------------------------------------------------------
	bool MouseHandlerBase::OnMsgProc( HWND i_hWnd, UINT i_nMsg, WPARAM i_wParam, LPARAM i_lParam )
	{
		bool ret = false;

		// マウスに関係するメッセージをハンドリングする
		switch( i_nMsg )
		{
		case WM_MOUSEMOVE:
			ret = OnMouseMove(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_LBUTTONDOWN:
			ret = OnLButtonDown(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_LBUTTONUP:
			ret = OnLButtonUp(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_RBUTTONDOWN:
			ret = OnRButtonDown(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_RBUTTONUP:
			ret = OnRButtonUp(LOWORD(i_lParam), HIWORD(i_lParam));
			break;
		case WM_MOUSEWHEEL:
			ret = OnMouseWheel( GET_WHEEL_DELTA_WPARAM(i_wParam) / WHEEL_DELTA );
			break;
		}

		return ret;
	}
开发者ID:larrson,项目名称:metashader,代码行数:30,代码来源:Mouse.cpp

示例7: CanvasProc

// 캔버스 윈도우의 메시지 처리 함수
LRESULT CALLBACK CanvasProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
    switch(iMessage) {
    case WM_CREATE:
        return OnCreate(hWnd,wParam,lParam);
    case WM_DESTROY:
        return OnDestroy(hWnd,wParam,lParam);
    case WM_PAINT:
        return OnPaint(hWnd,wParam,lParam);
    case WM_COMMAND:
        return OnCommand(hWnd,wParam,lParam);
    case WM_LBUTTONDOWN:
        return OnLButtonDown(hWnd,wParam,lParam);
    case WM_MOUSEMOVE:
        return OnMouseMove(hWnd,wParam,lParam);
    case WM_LBUTTONUP:
        return OnLButtonUp(hWnd,wParam,lParam);
    case WM_KEYDOWN:
        return OnKeyDown(hWnd,wParam,lParam);
    case WM_SETCURSOR:
        return OnSetCursor(hWnd,wParam,lParam);
    case WM_SIZE:
        return OnSize(hWnd,wParam,lParam);
    case WM_CONTEXTMENU:
        return OnContextMenu(hWnd,wParam,lParam);
    case WM_LBUTTONDBLCLK:
        return OnLButtonDblclk(hWnd,wParam,lParam);
    }
    return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}
开发者ID:MaybeS,项目名称:when_i_was_a_kid,代码行数:31,代码来源:ApiDraw.cpp

示例8: point

void CSequenceSetting::mousePressEvent(QMouseEvent *event)
{
   CPoint point(event->pos());
   unsigned int flags = 0;
   if ( event->modifiers()&Qt::ControlModifier )
   {
      flags |= MK_CONTROL;
   }
   if ( event->modifiers()&Qt::ShiftModifier )
   {
      flags |= MK_SHIFT;
   }
   if ( event->buttons()&Qt::LeftButton )
   {
      flags |= MK_LBUTTON;
   }
   if ( event->buttons()&Qt::MiddleButton )
   {
      flags |= MK_MBUTTON;
   }
   if ( event->buttons()&Qt::RightButton )
   {
      flags |= MK_RBUTTON;            
   }
   if ( event->button() == Qt::LeftButton )
   {
      OnLButtonDown(flags,point);
   }
   update();
}
开发者ID:zeroCoder1,项目名称:nesicide,代码行数:30,代码来源:SequenceSetting.cpp

示例9: OnLButtonDown

void CObjectView::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	if (mode == ZOOM)
  	OnLButtonDown(nFlags, point);   //  nicer action
  else
  	CView ::OnLButtonDblClk(nFlags, point);
}
开发者ID:bchretien,项目名称:spheretree,代码行数:7,代码来源:ObjectView.cpp

示例10: switch

unsigned CClanOrganizeDlg::Process( unsigned uiMsg, WPARAM wParam, LPARAM lParam )
{
	if( !IsVision() ) return 0;
	if( unsigned uiProcID = CTDialog::Process( uiMsg, wParam,lParam ))
	{
		switch( uiMsg )
		{
		case WM_LBUTTONUP:
			{
				switch( uiProcID )
				{
				case IID_BTN_CONFIRM:
					OrganizeClan();
					break;
				case IID_BTN_CLOSE:
				case IID_BTN_CANCEL:
					Hide();
					break;
				default:
					break;
				}
			}
		case WM_LBUTTONDOWN:
			OnLButtonDown( uiProcID, wParam, lParam );
			break;
		default:
			break;
		}
		return uiMsg;
	}
	return 0;
}
开发者ID:PurpleYouko,项目名称:Wibble_Wibble,代码行数:32,代码来源:ClanOrganizeDlg.cpp

示例11: switch

LRESULT WindowImplBase::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	LRESULT lRes = 0;
	BOOL bHandled = TRUE;
	switch (uMsg)
	{
	case WM_CREATE:			lRes = OnCreate(uMsg, wParam, lParam, bHandled); break;
	case WM_CLOSE:			lRes = OnClose(uMsg, wParam, lParam, bHandled); break;
	case WM_DESTROY:		lRes = OnDestroy(uMsg, wParam, lParam, bHandled); break;
#if defined(WIN32) && !defined(UNDER_CE)
	case WM_NCACTIVATE:		lRes = OnNcActivate(uMsg, wParam, lParam, bHandled); break;
	case WM_NCCALCSIZE:		lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled); break;
	case WM_NCPAINT:		lRes = OnNcPaint(uMsg, wParam, lParam, bHandled); break;
	case WM_NCHITTEST:		lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled); break;
	case WM_GETMINMAXINFO:	lRes = OnGetMinMaxInfo(uMsg, wParam, lParam, bHandled); break;
	case WM_MOUSEWHEEL:		lRes = OnMouseWheel(uMsg, wParam, lParam, bHandled); break;
#endif
	case WM_SIZE:			lRes = OnSize(uMsg, wParam, lParam, bHandled); break;	
	case WM_SYSCOMMAND:		lRes = OnSysCommand(uMsg, wParam, lParam, bHandled); break;
	case WM_KEYDOWN:		lRes = OnKeyDown(uMsg, wParam, lParam, bHandled); break;
	case WM_KILLFOCUS:		lRes = OnKillFocus(uMsg, wParam, lParam, bHandled); break;
	case WM_SETFOCUS:		lRes = OnSetFocus(uMsg, wParam, lParam, bHandled); break;
	case WM_LBUTTONUP:		lRes = OnLButtonUp(uMsg, wParam, lParam, bHandled); break;
	case WM_LBUTTONDOWN:	lRes = OnLButtonDown(uMsg, wParam, lParam, bHandled); break;
	case WM_MOUSEMOVE:		lRes = OnMouseMove(uMsg, wParam, lParam, bHandled); break;
	default:				bHandled = FALSE; break;
	}
	if (bHandled) return lRes;

	lRes = HandleCustomMessage(uMsg, wParam, lParam, bHandled);
	if (bHandled) return lRes;

	if (paint_manager_.MessageHandler(uMsg, wParam, lParam, lRes)) return lRes;
	return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
}
开发者ID:sonicsunsky,项目名称:duilib-tutorial,代码行数:35,代码来源:win_impl_base.cpp

示例12: ASSERT

BOOL CXTPCalendarWeekViewDay::OnLButtonDown(UINT nFlags, CPoint point)
{
	if (!GetView() || !GetCalendarControl())
	{
		ASSERT(FALSE);
		return FALSE;
	}

	if (GetView()->GetTheme())
	{
		if (XTP_SAFE_GET4(GetView(), GetTheme(), GetWeekViewPart(), GetDayPart(),
			OnLButtonDown(this, nFlags, point), FALSE))
		{
			return TRUE;
		}
	}
	else if (m_Layout.m_rcExpandSign.PtInRect(point))
	{
		if (UserAction_OnExpandDay(xtpCalendarExpandDayButton_WeekView))
			return TRUE;

		XTP_SAFE_CALL1(GetCalendarControl(), QueueDayViewSwitch(GetDayDate()));
		return TRUE;
	}

	return TBase::OnLButtonDown(nFlags, point);
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:27,代码来源:XTPCalendarWeekViewDay.cpp

示例13: switch

LRESULT CALLBACK CodeList::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg){
	case WM_CREATE:
		OnCreate(hWnd, uMsg, wParam, lParam);
		break;
	case WM_PAINT:
		OnPaint(hWnd, uMsg, wParam, lParam);
		break;
	case WM_SETFONT:
		OnSetFont(hWnd, uMsg, wParam, lParam);
		break;
	case WM_LBUTTONDOWN:
		OnLButtonDown(hWnd, uMsg, wParam, lParam);
		break;
	case WM_VSCROLL:
		OnVScroll(hWnd, uMsg, wParam, lParam);
		break;
	case WM_ENABLE:
		OnEnable(hWnd, uMsg, wParam, lParam);
		break;
	default:
		return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}
	return 0;
}
开发者ID:csersoft,项目名称:hard86,代码行数:26,代码来源:codelist.cpp

示例14: Slider_WndProc

    LRESULT CALLBACK Slider_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    {
        Slider_Info * const pInfo = GetInfo(hwnd);

        switch (uMsg)
        {
        case WM_CREATE:
            return OnCreate(hwnd);

        case WM_PAINT:
            return OnPaint(hwnd, pInfo);

        case WM_NCDESTROY:
            return OnNcDestroy(hwnd, pInfo);

        case WM_LBUTTONDOWN:
            return OnLButtonDown(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_LBUTTONUP:
            return OnLButtonUp(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_MOUSEMOVE:
            return OnMouseMove(hwnd, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), pInfo);

        case WM_ENABLE:
            if (wParam == FALSE) // Window is disabled. Stop tracking.
            {
                return OnReleaseSlider(hwnd, pInfo);
            }
            break;

        case WM_CAPTURECHANGED:
           // The window lost focus while the slider was tracking the mouse OR 
           // the slider released the mouse capture itself.
           return OnReleaseSlider(hwnd, pInfo);

            
        // Custom messages
        case WM_SLIDER_SET_THUMB_BITMAP:
            return OnSetThumbBitmap(hwnd, (WORD)wParam, pInfo);

        case WM_SLIDER_SET_BACKGROUND:
            return OnSetBackground(hwnd, (HBRUSH)wParam, pInfo);

        case WM_SLIDER_SET_MIN_MAX:
            return OnSetMinMax(hwnd, (LONG)wParam, (LONG)lParam, pInfo);

        case WM_SLIDER_SET_POSITION:
            return OnSetPosition(hwnd, (LONG)wParam, pInfo);

        case WM_SLIDER_GET_POSITION:
            return OnGetPosition(hwnd, pInfo);

        default:
            return DefWindowProc(hwnd, uMsg, wParam, lParam);
        }

        return 0;
    };
开发者ID:AbdoSalem95,项目名称:WindowsSDK7-Samples,代码行数:59,代码来源:Slider.cpp

示例15: OnLButtonDown

//右键按下,选中状态
void CGuiderView::OnRButtonDown(UINT nFlags, CPoint point)
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值
	OnLButtonDown(nFlags,  point);
	App_Veriable::LBDown=false;//左键状态

	CView::OnRButtonDown(nFlags, point);
}
开发者ID:fanzhidongyzby,项目名称:Guider,代码行数:9,代码来源:GuiderView.cpp


注:本文中的OnLButtonDown函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。