• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MAKEPOINTS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: switch

   LRESULT CALLBACK Splitter::ProcessMessage(UINT message, WPARAM wParam, LPARAM lParam)
   {
      switch(message) {
      case WM_SIZE:
         Size(LOWORD(lParam), HIWORD(lParam));
         return 0;
      case WM_PAINT:
         Paint();
         return 0;
      case WM_LBUTTONDOWN:
         LButtonDown(MAKEPOINTS(lParam));
         return 0;
      case WM_LBUTTONUP:
         LButtonUp(MAKEPOINTS(lParam));
         return 0;
      case WM_MOUSEMOVE:
         if(wParam & MK_LBUTTON)
            LButtonDrag(MAKEPOINTS(lParam));
         return 0;
      case WM_CAPTURECHANGED:
         CaptureChanged();
         return 0;
      }

      return Window::ProcessMessage(message, wParam, lParam);
   }
开发者ID:bstewart00,项目名称:remote-screen,代码行数:26,代码来源:Splitter.cpp


示例2: 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


示例3: GetWindowLong

LRESULT CALLBACK CWndSplitter::_wndProc(HWND hWnd, UINT uMsg, WPARAM wp, LPARAM lp)
{
	CWndSplitter *pThis = (CWndSplitter*) GetWindowLong (hWnd, GWL_USERDATA);

	switch (uMsg)
	{
		case WM_PAINT:
			pThis->OnPaint ();			
			return 0;

		case WM_LBUTTONDOWN:
			pThis->OnLButtonDown ();
			break;

		case WM_MOUSEMOVE:
			if (wp & MK_LBUTTON)
				pThis->OnMouseDrag (MAKEPOINTS (lp));
			return 0;

		case WM_LBUTTONUP:
			pThis->OnLButtonUp (MAKEPOINTS (lp));
			return 0;

		case WM_CAPTURECHANGED:
			pThis->OnCaptureChanged ();
			return 0;
	}

	return DefWindowProc (hWnd, uMsg, wp, lp);
}
开发者ID:ratever930,项目名称:freedownload,代码行数:30,代码来源:WndSplitter.cpp


示例4: DetourWindowProc

LRESULT
CALLBACK
DetourWindowProc ( _In_  HWND   hWnd,
                   _In_  UINT   uMsg,
                   _In_  WPARAM wParam,
                   _In_  LPARAM lParam )
{
  if (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST) {
    static POINT last_p = { LONG_MIN, LONG_MIN };

    POINT p;

    p.x = MAKEPOINTS (lParam).x;
    p.y = MAKEPOINTS (lParam).y;

    if (game_state.needsFixedMouseCoords () && config.render.aspect_correction) {
      // Only do this if cursor actually moved!
      //
      //   Otherwise, it tricks the game into thinking the input device changed
      //     from gamepad to mouse (and changes button icons).
      if (last_p.x != p.x || last_p.y != p.y) {
        CalcCursorPos (&p);

        last_p = p;
      }

      return DetourWindowProc_Original (hWnd, uMsg, wParam, MAKELPARAM (p.x, p.y));
    }

    last_p = p;
  }

  return DetourWindowProc_Original (hWnd, uMsg, wParam, lParam);
}
开发者ID:Kaldaien,项目名称:TZF,代码行数:34,代码来源:hook.cpp


示例5: MAKEPOINTS

//-----------------------------------------------------------------------------
// Name: MouseDown
// Object: should be call on a WM_LBUTTONDOWN message
// Parameters : 
//     in : LPARAM lParam : lParam of WndProc associated with WM_LBUTTONDOWN message
// Return : TRUE on success
//-----------------------------------------------------------------------------
BOOL CSelectWindow::MouseDown(LPARAM lParam)
{
    POINT pt;
    pt.x = MAKEPOINTS(lParam).x;
    pt.y = MAKEPOINTS(lParam).y; 
    ClientToScreen (hDlg, &pt);

    return this->MouseDown(pt);
}
开发者ID:340211173,项目名称:hf-2011,代码行数:16,代码来源:SelectWindow.cpp


示例6: HandleDialog

BOOL CALLBACK HandleDialog(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) 
{
	DATA data;
	HDC hdc;
	PAINTSTRUCT ps;
	static HANDLE hThread;

	switch(iMsg)
	{
	case WM_INITDIALOG:
		if( !InitSocket() )
			return TRUE;
		hThread = (HANDLE)_beginthread(ClientThread, NULL, NULL);
		return TRUE;
	case WM_LBUTTONDOWN:
		data.type = 0;
		data.pt = MAKEPOINTS(lParam);
		
		send(sClient, (char*)&data, sizeof(DATA), 0);
		return TRUE;
	case WM_RBUTTONDOWN:
		data.type = 1;
		data.pt = MAKEPOINTS(lParam);
		send(sClient, (char*)&data, sizeof(DATA), 0);
		return TRUE;
	case WM_PAINT:
		hdc = BeginPaint(hwnd, &ps);
		if(g_data.type == 0)
			Rectangle(hdc, g_data.pt.x, g_data.pt.y, g_data.pt.x+30, g_data.pt.y+30);
		else if(g_data.type==1)
			Ellipse(hdc, g_data.pt.x, g_data.pt.y, g_data.pt.x+30, g_data.pt.y+30);
		EndPaint(hwnd, &ps);
		return TRUE;
	case WM_COMMAND:
		switch(wParam) 
		{
		case IDC_EXIT:
			data.type = 2;
			send(sClient, (char*)&data, sizeof(DATA), 0);
			DestroyWindow(hwnd);
		}
		return TRUE;
	case WM_DESTROY:
		PostQuitMessage(0);
		return TRUE;
	default :
		break;
	}
	return 0L;
}
开发者ID:gawallsibya,项目名称:BIT_API-WNP-WSP,代码行数:50,代码来源:WinClient.cpp


示例7: ElasticLines_MessageHandler

LRESULT CALLBACK ElasticLines_MessageHandler( HWND hwnd, UINT msg, WPARAM w, LPARAM l ){
	HDC hdc;
	static POINTS ptsBegin, ptsPrevEnd, ptsEnd;
	COLORREF bgcolor = 0x00ffffff;

	switch( msg ){
	case WM_LBUTTONDOWN:
		SetCapture( hwnd );
		ptsBegin = MAKEPOINTS( l );
		ptsPrevEnd = ptsBegin;

	break;
	case WM_MOUSEMOVE:
		if ( w & MK_LBUTTON ){
			hdc = GetDC( hwnd );
			HPEN hpen = CreatePen( PS_DASHDOTDOT, 1, bgcolor );
			//HPEN redpen = CreatePen( PS_DASHDOTDOT, 1, 0x000000ff );
			HPEN hOldPen =(HPEN) SelectObject( hdc, hpen );

			MoveToEx( hdc, ptsBegin.x, ptsBegin.y, NULL );
			LineTo	( hdc, ptsPrevEnd.x, ptsPrevEnd.y );
			
			ptsEnd = MAKEPOINTS( l );
			SelectObject( hdc, hOldPen );
			MoveToEx( hdc, ptsBegin.x, ptsBegin.y, NULL );
			LineTo( hdc, ptsEnd.x, ptsEnd.y);

			ptsPrevEnd = ptsEnd;
			
			ReleaseDC( hwnd, hdc );
		}
	break;
	case WM_LBUTTONUP:
		ReleaseCapture();

	break;
	case WM_CLOSE:
		DestroyWindow( hwnd );
	break;
	case WM_DESTROY:
		PostQuitMessage( 0 );
	break;
	default:
		return DefWindowProc( hwnd, msg, w, l );
	}

	return 0;
}
开发者ID:tripathianurag,项目名称:assignments,代码行数:48,代码来源:EL.cpp


示例8: PostQuitMessage

	LRESULT Win32Window::wndProc(UINT msg, WPARAM wParam, LPARAM lParam) {
		if(msg == WM_CLOSE) {
			PostQuitMessage(0);
		}

		switch(msg) {
		case WM_SIZE:
			onResize(ResizeEvent(LOWORD(lParam), HIWORD(lParam)));
			break;

		case WM_KEYDOWN:
			onKeyDown(KeyEvent(wParam));
			break;

		case WM_KEYUP:
			onKeyUp(KeyEvent(wParam));
			break;

		case WM_MOUSEMOVE:
			POINTS pt = MAKEPOINTS(lParam);
			break;
		}

		return DefWindowProc(hwnd, msg, wParam, lParam);
	}
开发者ID:marrony,项目名称:game-engine-old,代码行数:25,代码来源:Win32Window.cpp


示例9: _GetCursorPos

BOOL WINAPI _GetCursorPos(LPPOINT lpPoint)
{
  if ( !lpPoint )
    return FALSE;

  if ( !wmode )
  {
    if ( _GetCursorPosOld )
      return _GetCursorPosOld(lpPoint);
    return GetCursorPos(lpPoint);
  }

  if ( !gbHoldingAlt )
  {
    lpPoint->x = 320;
    lpPoint->y = 240;
  }
  else
  {
    POINT tempPoint;
    if ( _GetCursorPosOld )
      _GetCursorPosOld(&tempPoint);
    else
      GetCursorPos(&tempPoint);
    ScreenToClient(ghMainWnd, &tempPoint);

    LPARAM lConvert = FixPoints(MAKELPARAM(tempPoint.x, tempPoint.y));
    POINTS final = MAKEPOINTS(lConvert);
    lpPoint->x = final.x;
    lpPoint->y = final.y;
  }
  return TRUE;
}
开发者ID:Maiven,项目名称:bwapi,代码行数:33,代码来源:WMode.cpp


示例10: mousePoint

LRESULT WebPopupMenuProxyWin::onLButtonDown(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, bool& handled)
{
    handled = true;

    IntPoint mousePoint(MAKEPOINTS(lParam));
    if (scrollbar()) {
        IntRect scrollBarRect = scrollbar()->frameRect();
        if (scrollBarRect.contains(mousePoint)) {
            // Put the point into coordinates relative to the scroll bar
            mousePoint.move(-scrollBarRect.x(), -scrollBarRect.y());
            PlatformMouseEvent event(hWnd, message, wParam, MAKELPARAM(mousePoint.x(), mousePoint.y()));
            scrollbar()->mouseDown(event);
            setScrollbarCapturingMouse(true);
            return 0;
        }
    }

    // If the mouse is inside the window, update the focused index. Otherwise, 
    // hide the popup.
    RECT bounds;
    ::GetClientRect(m_popup, &bounds);
    if (::PtInRect(&bounds, mousePoint))
        setFocusedIndex(listIndexAtPoint(mousePoint), true);
    else
        hide();

    return 0;
}
开发者ID:ACSOP,项目名称:android_external_webkit,代码行数:28,代码来源:WebPopupMenuProxyWin.cpp


示例11: KillTimer

LRESULT CTaskbarNotifier::OnMouseHover(WPARAM /*wParam*/, LPARAM lParam)
{
	if (m_nAnimStatus == IDT_WAITING)
		KillTimer(IDT_WAITING);

	POINTS mp;
	mp = MAKEPOINTS(lParam);
	m_ptMousePosition.x = mp.x;
	m_ptMousePosition.y = mp.y;

	if (m_bMouseIsOver == FALSE)
	{
		m_bMouseIsOver = TRUE;
		RedrawWindow(&m_rcText);
	}
	else if (m_rcText.PtInRect(m_ptMousePosition))
	{
		if (!m_bTextSelected)
			RedrawWindow(&m_rcText);
	}
	else
	{
		if (m_bTextSelected)
			RedrawWindow(&m_rcText);
	}

	return 0;
}
开发者ID:axxapp,项目名称:winxgui,代码行数:28,代码来源:TaskbarNotifier.cpp


示例12: MAKEPOINTS

BOOL CXTPDatePickerList::IsSelected(int nX, CRect rcItem) const
{
	BOOL bReturn = FALSE;

	// determine cursor position
	DWORD dwPos = ::GetMessagePos();
	POINTS ptsPos = MAKEPOINTS(dwPos);
	CPoint ptPos;
	ptPos.x = ptsPos.x;
	ptPos.y = ptsPos.y;

	ScreenToClient(&ptPos);

	CRect rcClient;
	GetClientRect(rcClient);

	if (ptPos.x < rcClient.left || ptPos.x > rcClient.right ||
		ptPos.y < rcClient.top || ptPos.y > rcClient.bottom)
		return FALSE;

	if (ptPos.y < 0 && nX == 0)
		bReturn = TRUE;
	else if (ptPos.y > rcClient.Height() && nX == (m_nItemsBelow + m_nItemsAbove))
		bReturn = TRUE;
	else if (ptPos.y >= rcItem.top && ptPos.y <= rcItem.bottom-1)
		bReturn = TRUE;

	return bReturn;
}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:29,代码来源:XTPDatePickerList.cpp


示例13: WndProc

// 主窗口的消息处理函数
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
{
    switch (message)
    {
    case WM_ERASEBKGND:         // 不清除背景,避免闪烁
        break;
    case WM_PAINT:              // 重绘主窗口
        ondraw(hwnd);
        break;
    case WM_SIZE:               // 改变窗口大小
        regen(hwnd);
        break;
    case WM_DESTROY:            // 退出
        PostQuitMessage(0);
        break;
    case WM_LBUTTONDBLCLK:      // 双击切换测试图形
        switchTest(hwnd);
        break;
    case WM_MOUSEMOVE:          // 鼠标移动
        _pt = MAKEPOINTS(lparam);
        InvalidateRect(hwnd, NULL, FALSE);
        break;
    default:
        return DefWindowProc(hwnd, message, wparam, lparam);
    }

    return 0;
}
开发者ID:donal-tong,项目名称:TouchVG,代码行数:29,代码来源:app.cpp


示例14: MAKEPOINTS

int CHolderWindow::OnHolderWindowMouseMove(LPARAM lParam)
{
	static POINTS	ptsPrevCursor;
	POINTS			ptsCursor;
	RECT			rc;

	ptsCursor = MAKEPOINTS(lParam);
	GetClientRect(m_hHolder,&rc);

	/* Is the window in the process of been resized? */
	if(m_bHolderResizing)
	{
		/* Mouse hasn't moved. */
		if((ptsPrevCursor.x == ptsCursor.x)
			&& (ptsPrevCursor.y == ptsCursor.y))
			return 0;

		ptsPrevCursor.x = ptsCursor.x;
		ptsPrevCursor.y = ptsCursor.y;

		SendMessage(GetParent(m_hHolder),WM_USER_HOLDERRESIZED,(WPARAM)m_hHolder,(LPARAM)ptsCursor.x);

		return 1;
	}

	if(ptsCursor.x >= (rc.right - 10))
	{
		SetCursor(LoadCursor(NULL,IDC_SIZEWE));
	}

	return 0;
}
开发者ID:3scp8,项目名称:explorerplusplus,代码行数:32,代码来源:HolderWindow.cpp


示例15: KillTimer

LRESULT CTaskbarNotifier::OnMouseHover(WPARAM /*wParam*/, LPARAM lParam)
{
	if (m_nAnimStatus == IDT_WAITING)
		KillTimer(IDT_WAITING);

	POINTS mp;
	mp = MAKEPOINTS(lParam);
	m_ptMousePosition.x = mp.x;
	m_ptMousePosition.y = mp.y;

	if (m_bMouseIsOver == FALSE)
	{
		m_bMouseIsOver = TRUE;
		RedrawWindow();
	}
	else if ((m_ptMousePosition.x >= m_rcText.left) && (m_ptMousePosition.x <= m_rcText.right)
			 && (m_ptMousePosition.y >= m_rcText.top) && (m_ptMousePosition.y <= m_rcText.bottom))
	{
		if (!m_bTextSelected)
			RedrawWindow();
	}
	else
	{
		if (m_bTextSelected)
			RedrawWindow();
	}

	return 0;
}
开发者ID:LjApps,项目名称:eMule-VeryCD,代码行数:29,代码来源:TaskbarNotifier.cpp


示例16: SetDlgIcon

BOOL TAbsenceDlg::EvCreate(LPARAM lParam)
{
	SetDlgIcon(hWnd);

	if (rect.left == CW_USEDEFAULT)
	{
		DWORD	val = GetMessagePos();
		POINTS	pos = MAKEPOINTS(val);

		GetWindowRect(&rect);
		int cx = ::GetSystemMetrics(SM_CXFULLSCREEN), cy = ::GetSystemMetrics(SM_CYFULLSCREEN);
		int xsize = rect.right - rect.left, ysize = rect.bottom - rect.top;
		int x = pos.x - xsize / 2, y = pos.y - ysize;

		if (x + xsize > cx)
			x = cx - xsize;
		if (y + ysize > cy)
			y = cy - ysize;

		MoveWindow(x > 0 ? x : 0, y > 0 ? y : 0, xsize, ysize, FALSE);
	}
	else
		MoveWindow(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, FALSE);

	typedef char MaxBuf[MAX_PATH_U8];
	typedef char MaxHead[MAX_NAMEBUF];
	tmpAbsenceStr = new MaxBuf[cfg->AbsenceMax];
	tmpAbsenceHead = new MaxHead[cfg->AbsenceMax];

	SetData();
	return	TRUE;
}
开发者ID:nianhuaxpj,项目名称:ipmsg,代码行数:32,代码来源:miscdlg.cpp


示例17: WndProc

static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    static WindowWin32* pWin = NULL;
    switch (message)
    {
    case WM_NCCREATE:
    {
        CREATESTRUCT *cs = reinterpret_cast<CREATESTRUCT *>(lParam);
        pWin = reinterpret_cast<WindowWin32 *>(cs->lpCreateParams);
    }
    break;

    case WM_DESTROY:
        if (pWin->GetController().get())
            pWin->GetController()->OnDestroy();
        ::PostQuitMessage(0);
        return 0;

    case WM_KEYDOWN:
    {
        KeyPressWin32 kPress(wParam);
        if (pWin->GetController().get())
            pWin->GetController()->OnKeyDown(kPress.GetKey());
    }
    return 0;

    case WM_LBUTTONDOWN:
    {
        POINTS p = MAKEPOINTS(lParam);
        KeyStateWin32 kState(wParam);
        if (pWin->GetController().get())
            pWin->GetController()->OnLButtonDown(p.x, p.y, kState);
    }
    return 0;

    case WM_MOUSEMOVE:
    {
        POINTS p = MAKEPOINTS(lParam);
        KeyStateWin32 kState(wParam);
        if (pWin->GetController().get())
            pWin->GetController()->OnMouseMove(p.x, p.y, kState);
    }
    return 0;
    }

    return DefWindowProc (hWnd, message, wParam, lParam) ;
}
开发者ID:JianchengZh,项目名称:kasicass,代码行数:47,代码来源:K1RWindowWin32.cpp


示例18: switch

BOOL CTitleTip::PreTranslateMessage(MSG* pMsg) 
{
	CWnd                    *pWnd;
	int                     hittest;

	switch (pMsg->message)
	{
	case WM_LBUTTONDOWN:
	case WM_RBUTTONDOWN:
	case WM_MBUTTONDOWN:
		POINTS pts = MAKEPOINTS( pMsg->lParam );
		POINT  point;
		point.x = pts.x;
		point.y = pts.y;
		ClientToScreen( &point );
		pWnd = WindowFromPoint( point );
		if( pWnd == this ) 
			pWnd = m_pParentWnd;

		hittest = (int)pWnd->SendMessage(WM_NCHITTEST,0,MAKELONG(point.x,point.y));

		if (hittest == HTCLIENT) {
			pWnd->ScreenToClient( &point );
			pMsg->lParam = MAKELONG(point.x,point.y);
		} else {
			switch (pMsg->message) {
			case WM_LBUTTONDOWN: 
				pMsg->message = WM_NCLBUTTONDOWN;
				break;
			case WM_RBUTTONDOWN: 
				pMsg->message = WM_NCRBUTTONDOWN;
				break;
			case WM_MBUTTONDOWN: 
				pMsg->message = WM_NCMBUTTONDOWN;
				break;
			}
			pMsg->wParam = hittest;
			pMsg->lParam = MAKELONG(point.x,point.y);
		}

        Hide();
		pWnd->PostMessage(pMsg->message,pMsg->wParam,pMsg->lParam);
		return TRUE;	
		
	case WM_KEYDOWN:
	case WM_SYSKEYDOWN:
        Hide();
		m_pParentWnd->PostMessage( pMsg->message, pMsg->wParam, pMsg->lParam );
		return TRUE;
	}

	if( GetFocus() == NULL )
	{
        Hide();
		return TRUE;
	}

	return CWnd::PreTranslateMessage(pMsg);
}
开发者ID:modmanmatt,项目名称:blackcats-mirc,代码行数:59,代码来源:TitleTip.cpp


示例19: switch

//+---------------------------------------------------------------------------
//
//  Member:     CScrollbarController::OnMessage
//              
//  Synopsis:   Handle messages sent to this scroll bar controller.
//              
//  Arguments:  
//              
//  Notes:      
//              
//----------------------------------------------------------------------------
LRESULT CScrollbarController::OnMessage(UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch(msg)
	{
	case WM_MOUSEMOVE:
		MouseMove(CPoint(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y));
		break;

	case WM_LBUTTONDBLCLK:
	case WM_LBUTTONDOWN:
		AssertSz(FALSE, "CScrollbarController got unexpected message");
		break;

	case WM_LBUTTONUP:
		if(_partPressed != SBP_NONE)
		{
			// invalidate just the part that was pressed
			_partPressed = SBP_NONE;
			CSize scrollOffset;
			_pDispScroller->GetScrollOffset(&scrollOffset);
			LONG containerSize = _rcScrollbar.Size(_direction);
			Verify(_pLayout->OpenView());
			InvalidatePart(
				_partPressedStart,
				_direction,
				_rcScrollbar,
				_pDispScroller->GetContentSize()[_direction],
				containerSize,
				scrollOffset[_direction],
				_buttonWidth,
				_pDispScroller,
				&_drawInfo);
		}

		// fall thru to Terminate...
	case WM_CAPTURECHANGED:
		goto Terminate;
	}

	return 0;

Terminate:
	StopScrollbarController();
	return 0;
}
开发者ID:hufuman,项目名称:xindows,代码行数:56,代码来源:ScrollbarController.cpp


示例20: _WndProc

LRESULT CALLBACK _WndProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam)
{
	switch(uMessage)
    {
	// ADD CUSTOM WINDOWS MESSAGE HANDLERS HERE
	case WM_KEYDOWN:
		Keyboard::_SetKeyboardKey((UINT)wParam, true);
		break;

	case WM_KEYUP:
		Keyboard::_SetKeyboardKey((UINT)wParam, false);
		break;

	case WM_LBUTTONDOWN:
        Mouse::_SetMousePosition(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y);
        Mouse::_SetMouseLeftButton(true);
        break;	

    case WM_LBUTTONUP:
        Mouse::_SetMousePosition(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y);
        Mouse::_SetMouseLeftButton(false);
        break;

    case WM_MOUSEMOVE:
        Mouse::_SetMousePosition(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y);
        break;

	case WM_RBUTTONDOWN:
        Mouse::_SetMousePosition(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y);
		Mouse::_SetMouseRightButton(true);
        break;

    case WM_RBUTTONUP:
        Mouse::_SetMousePosition(MAKEPOINTS(lParam).x, MAKEPOINTS(lParam).y);
		Mouse::_SetMouseRightButton(false);
        break;	

	case WM_DESTROY:
        g_bAppRunning = false;
        break;
    }

    return DefWindowProc(hWnd,uMessage,wParam,lParam);
}
开发者ID:MilanLoveless,项目名称:ThermostatProject,代码行数:44,代码来源:EntryPoint.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MAKEWORD函数代码示例发布时间:2022-05-30
下一篇:
C++ MAKELPARAM函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap