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


C++ MAKEPOINTS函数代码示例

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


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


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