Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
//////////////////
// Message handler handles caption-related messages
//
BOOL CCaptionPainter::RelayEvent(MSG* pMsg) 
{
	switch (pMsg->message)
	{
		case WM_MOUSEMOVE:
			return OnMouseMoveMsg(pMsg->pt);

		case WM_LBUTTONUP:
			return OnLButtonUp(pMsg->lParam, pMsg->pt);

		case WM_NCPAINT:
			return OnNcPaint(HRGN(pMsg->wParam));
		
		case WM_NCACTIVATE:
			return OnNcActivate(pMsg->wParam);
		
		case WM_SETTEXT:
			return OnSetText((LPCTSTR)pMsg->lParam);
		
		case WM_SYSCOLORCHANGE:
		case WM_SETTINGCHANGE:
			Invalidate();
			//m_pParentDlg->SendMessage(m_nPaintMsg, 0, 0L);
			return FALSE;
	}
	return FALSE;
}
Ejemplo n.º 3
0
void CFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
#if _FX_OS_ == _FX_OS_MACOSX_
  if (!pMessage)
    return;

  switch (pMessage->GetType()) {
    case CFWL_Message::Type::Mouse: {
      CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
      switch (pMsg->m_dwCmd) {
        case FWL_MouseCommand::LeftButtonDown:
          OnLButtonDown(pMsg);
          break;
        case FWL_MouseCommand::LeftButtonUp:
          OnLButtonUp(pMsg);
          break;
        default:
          break;
      }
      break;
    }
    default:
      break;
  }
#endif  // _FX_OS_ == _FX_OS_MACOSX_
}
Ejemplo n.º 4
0
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);
}
Ejemplo n.º 5
0
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);
}
Ejemplo n.º 6
0
unsigned int CTargetMenu::Process(UINT uiMsg,WPARAM wParam,LPARAM lParam)
{
	if(!IsVision()) return 0;
	
	unsigned iProcID = 0;
	if( iProcID = CTDialog::Process(uiMsg,wParam,lParam)) 
	{
		switch(uiMsg)
		{
		case WM_LBUTTONUP:
			{
				if( OnLButtonUp( iProcID ) )
					return uiMsg;
				break;
			}
		case WM_RBUTTONDOWN:
			Hide();
			break;
		default:
			break;
		}
		return uiMsg;
	}
	else
	{
		if( uiMsg == WM_RBUTTONDOWN )
		{
			Hide();
			return uiMsg;
		}
	}
	return 0;
}
Ejemplo n.º 7
0
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;
}
Ejemplo n.º 8
0
	//--------------------------------------------------------------------------------------------
	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;
	}
Ejemplo n.º 9
0
//ʵÏÖBaseWindowµÄ½Ó¿Ú
LRESULT CALLBACK CEqualizerWnd::WindowProc(HWND hwnd,UINT uMsg, WPARAM wParam,LPARAM lParam )
{
	POINT point = {0};
	switch (uMsg)
	{
	case WM_CREATE:
		OnCreate(uMsg,wParam,lParam);
		break;
	case WM_PAINT:
		OnPaint(uMsg,wParam,lParam);
		break;
	case WM_LBUTTONDOWN:
		point.x = LOWORD(lParam); 
		point.y = HIWORD(lParam); 
		OnLButtonDown(point);
		break;
	case WM_LBUTTONUP:
		point.x = LOWORD(lParam); 
		point.y = HIWORD(lParam); 
		OnLButtonUp(point);
		break;
	case WM_MOUSEMOVE:
		point.x = LOWORD(lParam); 
		point.y = HIWORD(lParam); 
		OnMouseMove(point);
		break;
	case WM_DESTROY:
		OnDestroy(uMsg,wParam,lParam);
		break;
	default:
		return DefWindowProc(hwnd, uMsg, wParam, lParam);
	}
	return 0;
}
Ejemplo n.º 10
0
// 캔버스 윈도우의 메시지 처리 함수
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));
}
Ejemplo n.º 11
0
//窗口处理函数
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 );
}
Ejemplo n.º 12
0
    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;
    };
Ejemplo n.º 13
0
void CSkinButton::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	// TODO: Add your message handler code here and/or call default
	if ( nChar == VK_SPACE )
		OnLButtonUp( 0, 0 );
	
	//CButton::OnKeyUp(nChar, nRepCnt, nFlags);
}
Ejemplo n.º 14
0
void CFWL_CheckBoxImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
  if (!pMessage)
    return;

  switch (pMessage->GetClassID()) {
    case CFWL_MessageType::Activate: {
      OnActivate(pMessage);
      break;
    }
    case CFWL_MessageType::SetFocus: {
      OnFocusChanged(pMessage, TRUE);
      break;
    }
    case CFWL_MessageType::KillFocus: {
      OnFocusChanged(pMessage, FALSE);
      break;
    }
    case CFWL_MessageType::Mouse: {
      CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
      switch (pMsg->m_dwCmd) {
        case FWL_MouseCommand::LeftButtonDown: {
          OnLButtonDown(pMsg);
          break;
        }
        case FWL_MouseCommand::LeftButtonUp: {
          OnLButtonUp(pMsg);
          break;
        }
        case FWL_MouseCommand::Move: {
          OnMouseMove(pMsg);
          break;
        }
        case FWL_MouseCommand::Leave: {
          OnMouseLeave(pMsg);
          break;
        }
        default:
          break;
      }
      break;
    }
    case CFWL_MessageType::Key: {
      CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
      if (pKey->m_dwCmd == FWL_KeyCommand::KeyDown)
        OnKeyDown(pKey);
      break;
    }
    default: {
      break;
    }
  }

  CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
}
Ejemplo n.º 15
0
int32_t CFWL_PushButtonImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
  if (!pMessage)
    return 0;
  if (!m_pOwner->IsEnabled()) {
    return 1;
  }
  int32_t iRet = 1;
  FX_DWORD dwMsgCode = pMessage->GetClassID();
  switch (dwMsgCode) {
    case FWL_MSGHASH_SetFocus:
    case FWL_MSGHASH_KillFocus: {
      OnFocusChanged(pMessage, dwMsgCode == FWL_MSGHASH_SetFocus);
      break;
    }
    case FWL_MSGHASH_Mouse: {
      CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
      FX_DWORD dwCmd = pMsg->m_dwCmd;
      switch (dwCmd) {
        case FWL_MSGMOUSECMD_LButtonDown: {
          OnLButtonDown(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_LButtonUp: {
          OnLButtonUp(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_MouseMove: {
          OnMouseMove(pMsg);
          break;
        }
        case FWL_MSGMOUSECMD_MouseLeave: {
          OnMouseLeave(pMsg);
          break;
        }
        default: {}
      }
      break;
    }
    case FWL_MSGHASH_Key: {
      CFWL_MsgKey* pKey = static_cast<CFWL_MsgKey*>(pMessage);
      if (pKey->m_dwCmd == FWL_MSGKEYCMD_KeyDown) {
        OnKeyDown(pKey);
      }
      break;
    }
    default: {
      iRet = 0;
      break;
    }
  }
  CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
  return iRet;
}
Ejemplo n.º 16
0
LRESULT CHyperlink::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch (uMsg)
	{
	case WM_LBUTTONDOWN:  OnLButtonDown();		break;
	case WM_LBUTTONUP:	  OnLButtonUp(lParam);	break;
	case WM_SETCURSOR:	  return OnSetCursor();	
	case WM_NCHITTEST:	  return HTCLIENT;		// Claim that the mouse is in a client area
	}

	return WndProcDefault(uMsg, wParam, lParam);
}
Ejemplo n.º 17
0
INT_PTR CALLBACK CLyricsDlg::DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch (uMsg)
	{
	case WM_DESTROY: KillTimer(hDlg, ID_TIMER); break;
	case WM_CLOSE: EndDialog(hDlg, IDCANCEL); break;
	case WM_COMMAND:
		{
			switch (LOWORD(wParam))
			{
			case IDOK: OnOk(hDlg); break;
			case IDCANCEL: EndDialog(hDlg, IDCANCEL); break;
			case IDC_SET: OnSet(hDlg); break;
			}
		}
		break;//case WM_COMMAND
	case WM_INITDIALOG: OnInitDialog(hDlg, lParam);break;

	case WM_DRAWITEM:
		{
			DRAWITEMSTRUCT* pDraw = (DRAWITEMSTRUCT*)lParam;
			HDC hMemDC = CreateCompatibleDC(pDraw->hDC);
			HBITMAP hOldBmp;
	
			if (pDraw->itemAction & ODA_SELECT || pDraw->itemAction & ODA_DRAWENTIRE)
			{
				if (pDraw->itemState & ODS_SELECTED)
					hOldBmp = (HBITMAP)SelectObject(hMemDC, m_hbSet2);
				else
					hOldBmp = (HBITMAP)SelectObject(hMemDC, m_hbSet);
			}
			else
				hOldBmp = (HBITMAP)SelectObject(hMemDC, m_hbSet);

			BitBlt(pDraw->hDC, 0, 0, 22, 19, hMemDC, 0, 0, SRCCOPY);
			SelectObject(hMemDC, hOldBmp);

			HFONT hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
			RECT rect;// = {0, 0, 21, 18};
			GetClientRect(pDraw->hwndItem, &rect);
			SetBkMode(pDraw->hDC, TRANSPARENT);
			DrawTextA(pDraw->hDC, "Setează", -1, &rect, DT_CENTER | DT_VCENTER | DT_EXTERNALLEADING | DT_SINGLELINE); 

			DeleteDC(hMemDC);
		}
		break;

	case WM_LBUTTONUP: OnLButtonUp(hDlg, wParam, lParam); break;
	case WM_MOUSEMOVE: OnMouseMove(hDlg, wParam, lParam); break;
	}

	return 0;
}
Ejemplo n.º 18
0
LRESULT EventMgr::OnMessage(UINT msg, WPARAM wParam, LPARAM lParam, bool& wasHandled)
{
    wasHandled = false;

    if (WM_ENTERSIZEMOVE == msg) {
        inSizeMove = true;
    }

    if (WM_EXITSIZEMOVE == msg) {
        inSizeMove = false;
    }

    if (WM_SIZE == msg) {
        //int dx = LOWORD(lParam);
        //int dy = HIWORD(lParam);
        wndRoot->RequestLayout();
        return 0;
    }

    wndRoot->LayoutIfRequested();

    if (WM_SETCURSOR == msg) {
        POINT pt;
        if (GetCursorPos(&pt) && ScreenToClient(wndRoot->hwndParent, &pt))
            return OnSetCursor(pt.x, pt.y, wasHandled);
        return 0;
    }

    if (WM_MOUSEMOVE == msg) {
        int x = GET_X_LPARAM(lParam);
        int y = GET_Y_LPARAM(lParam);
        return OnMouseMove(wParam, x, y, wasHandled);
    }

    if (WM_LBUTTONUP == msg) {
        int x = GET_X_LPARAM(lParam);
        int y = GET_Y_LPARAM(lParam);
        return OnLButtonUp(wParam, x, y, wasHandled);
    }

    if (WM_GETMINMAXINFO == msg) {
        return OnGetMinMaxInfo((MINMAXINFO*)lParam, wasHandled);
    }

    if (WM_PAINT == msg) {
        wndRoot->OnPaint(wndRoot->hwndParent);
        wasHandled = true;
        return 0;
    }

    return 0;
}
Ejemplo n.º 19
0
//---------------------------------------------------------------------------------------
void z_ed3View::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
    if(nChar == ('i') || nChar == ('I'))
    {
        CPoint pt;
        GetCursorPos(&pt);
        ScreenToClient(&pt);
        _blockMouseCall=1;
        OnLButtonUp(0, pt) ;
        _blockMouseCall=0;
        _downKey =  0;
        return ;
    }
    else if(nChar == ('p') || nChar == ('P'))
    {
        CPoint pt;
        GetCursorPos(&pt);
        ScreenToClient(&pt);
        _blockMouseCall=1;
        OnRButtonUp(0, pt) ;
        _blockMouseCall=0;
        _downKey =  0;
        return ;
    }
    else if(nChar == ('o') || nChar == ('O'))
    {
        CPoint pt;
        GetCursorPos(&pt);
        ScreenToClient(&pt);
        _blockMouseCall=1;
        OnLButtonUp(0, pt) ;
        OnRButtonUp(0, pt) ;
        _blockMouseCall=0;
        _downKey =  0;
        return ;
    }
    if(!_blockKeyCall)
        CView::OnKeyDown(nChar, nRepCnt, nFlags);
}
Ejemplo n.º 20
0
	LRESULT CWin::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_NCCREATE:		lRes = OnNcCreate(uMsg, wParam, lParam, bHandled); break;
		case WM_NCMOUSEMOVE:    lRes = OnNCMouseMove(uMsg, wParam, lParam, bHandled); break;
		case WM_NCMOUSELEAVE:   lRes = OnNCMouseLeave(uMsg, wParam, lParam, bHandled); break;
		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_ERASEBKGND:     lRes = OnEraseBkGnd(uMsg, wParam, lParam, bHandled); break;
		case WM_SIZE:			lRes = OnSize(uMsg, wParam, lParam, bHandled); break;
		case WM_CHAR:		    lRes = OnChar(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;
		case WM_MOUSELEAVE:     lRes = OnMouseLeave(uMsg, wParam, lParam, bHandled); break;
		case WM_MOUSEHOVER:	    lRes = OnMouseHover(uMsg, wParam, lParam, bHandled); break;
		case WM_HOTKEY:			lRes = OnHotKey(uMsg, wParam, lParam, bHandled); break;
//		case WM_TIMER:			lRes = OnTimer(uMsg, wParam, lParam, bHandled); break;//OnTimer响应有小问题
		case WM_MOVING:			lRes = OnMoving(uMsg, wParam, lParam, bHandled); break;
		case WM_SIZING:			lRes = OnSizing(uMsg, wParam, lParam, bHandled); break;
		case WM_SHOWWINDOW:		lRes = OnShowWindow(uMsg, wParam, lParam, bHandled); break;
		case WM_COMMAND:		lRes = OnCommand(uMsg, wParam, lParam, bHandled); break;
//		case WM_PAINT:			lRes = OnPaint(uMsg, wParam, lParam, bHandled); break;//OnPaint响应有问题
		case WM_MENUCOMMAND:    lRes = OnMenuCommand(uMsg, wParam, lParam, bHandled); break;
		default:				bHandled = FALSE; break;
		}
		if (bHandled) return lRes;

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

		if(_paintManager && _paintManager->MessageHandler(uMsg,wParam,lParam,lRes))
			return lRes;
		return __super::HandleMessage(uMsg,wParam,lParam);
	}
Ejemplo n.º 21
0
void CWndPopup::OnLButtonUp(UINT nFlags, CPoint point)
{
	if (m_bIsSetCapture)
	{
		ReleaseCapture();
		m_bIsSetCapture = false;
	}
	m_bLButtonDown = false;
	if(OnLButtonUp(point))
	{
		DrawWindow();
	}
	CWnd::OnLButtonUp(nFlags, point);
}
Ejemplo n.º 22
0
WMSG_RESULT CUITree::LButtonUp( UINT16 x, UINT16 y )
{
	WMSG_RESULT ret = WMSG_FAIL;

	if (m_bHide == FALSE)
	{
		ret = OnLButtonUp(x, y);
	}

	if (ret == WMSG_FAIL)
		ret = LButtonUpChild(x, y);

	return ret;
}
Ejemplo n.º 23
0
LRESULT cBiomeViewWnd::WndProc(HWND a_Wnd, UINT a_Msg, WPARAM wParam, LPARAM lParam)
{
	switch (a_Msg)
	{
		case WM_CLOSE:       return OnClose();
		case WM_COMMAND:     return OnCommand(wParam, lParam);
		case WM_LBUTTONDOWN: return OnLButtonDown(wParam, lParam);
		case WM_LBUTTONUP:   return OnLButtonUp  (wParam, lParam);
		case WM_MOUSEMOVE:   return OnMouseMove  (wParam, lParam);
		case WM_PAINT:       return OnPaint();
		case WM_TIMER:       return OnTimer(wParam);
	}
	return ::DefWindowProc(a_Wnd, a_Msg, wParam, lParam);
}
Ejemplo n.º 24
0
LRESULT CFooterBar::Reaction(UINT message, WPARAM wParam, LPARAM lParam){
	if(message == WM_ERASEBKGND)
		return TRUE;
	else if(message == WM_PAINT)
		return OnPaint();
	else if(message == WM_LBUTTONDOWN){
		return OnLButtonDown(wParam,lParam);
	}else if (message == WM_LBUTTONUP)
	{
		return OnLButtonUp(wParam,lParam);
	}else if (message == WM_SIZE){
		Layout();
		return 0;
	}
	return CWinSpace2::Reaction(message,wParam,lParam);
}
Ejemplo n.º 25
0
void IHISession::HILButtonUp (int x, int y, DWORD dwFlags)

//	HILButtonUp
//
//	Handle mouse input
	
	{
	if (::GetCapture() == m_HI.GetHWND())
		::ReleaseCapture();

	//	See if the animator will handle it

	if (m_Reanimator.HandleLButtonUp(x, y, dwFlags))
		return;

	OnLButtonUp(x, y, dwFlags);
	}
Ejemplo n.º 26
0
//---------------------------------------------------------------------------
void CFabAtHomeView::OnLButtonDown(UINT nFlags, CPoint point) 
//---------------------------------------------------------------------------
{
	if (bPanning) OnLButtonUp(nFlags, point);

	CFabAtHomeApp *pApp = (CFabAtHomeApp *) AfxGetApp();

    wglMakeCurrent(m_pDC->GetSafeHdc(), hrc);
	Pick(nFlags, point);

	bPanning = TRUE;
	startPoint = point;
	SetCursor(pApp->hHandCursor);
	SetCapture();
	
	CView::OnLButtonDown(nFlags, point);
}
Ejemplo n.º 27
0
    void SDLWrapper::HandleMouseButtonUpEvents( SDL_Event* event )
    {
        switch( event->button.button )
        {
            case SDL_BUTTON_LEFT:
                OnLButtonUp( event->button.x, event->button.y );
                break;

            case SDL_BUTTON_RIGHT:
                OnRButtonUp(event->button.x, event->button.y);
                break;

            case SDL_BUTTON_MIDDLE:
                OnMButtonUp(event->button.x, event->button.y);
                break;
        }
    }
Ejemplo n.º 28
0
WMSG_RESULT CUIBase::LButtonUp(UINT16 x, UINT16 y)
{
    if (m_bHide)
        return WMSG_FAIL;

    if (IsInside(x, y) == FALSE)
        return WMSG_FAIL;

    WMSG_RESULT ret = WMSG_FAIL;

    ret = OnLButtonUp(x, y);

    if (ret == WMSG_FAIL)
        ret = LButtonUpChild(x, y);

    return ret;
}
Ejemplo n.º 29
0
int32_t CFWL_DateTimePickerImpDelegate::OnProcessMessage(
    CFWL_Message* pMessage) {
  if (!pMessage)
    return 0;
  FX_DWORD dwMsgCode = pMessage->GetClassID();
  int32_t iRet = 1;
  switch (dwMsgCode) {
    case FWL_MSGHASH_SetFocus:
    case FWL_MSGHASH_KillFocus: {
      OnFocusChanged(pMessage, dwMsgCode == FWL_MSGHASH_SetFocus);
      break;
    }
    case FWL_MSGHASH_Mouse: {
      CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage);
      FX_DWORD dwCmd = pMouse->m_dwCmd;
      switch (dwCmd) {
        case FWL_MSGMOUSECMD_LButtonDown: {
          OnLButtonDown(pMouse);
          break;
        }
        case FWL_MSGMOUSECMD_LButtonUp: {
          OnLButtonUp(pMouse);
          break;
        }
        case FWL_MSGMOUSECMD_MouseMove: {
          OnMouseMove(pMouse);
          break;
        }
        case FWL_MSGMOUSECMD_MouseLeave: {
          OnMouseLeave(pMouse);
          break;
        }
        default: {}
      }
      break;
    }
    default: { iRet = 0; }
  }
  if (dwMsgCode == FWL_MSGHASH_Key &&
      m_pOwner->m_pEdit->GetStates() & FWL_WGTSTATE_Focused) {
    IFWL_WidgetDelegate* pDelegate = m_pOwner->m_pEdit->SetDelegate(NULL);
    return pDelegate->OnProcessMessage(pMessage);
  }
  return CFWL_WidgetImpDelegate::OnProcessMessage(pMessage);
}
Ejemplo n.º 30
0
void CFWL_PushButton::OnProcessMessage(CFWL_Message* pMessage) {
  if (!pMessage)
    return;
  if (!IsEnabled())
    return;

  switch (pMessage->GetType()) {
    case CFWL_Message::Type::SetFocus:
      OnFocusChanged(pMessage, true);
      break;
    case CFWL_Message::Type::KillFocus:
      OnFocusChanged(pMessage, false);
      break;
    case CFWL_Message::Type::Mouse: {
      CFWL_MessageMouse* pMsg = static_cast<CFWL_MessageMouse*>(pMessage);
      switch (pMsg->m_dwCmd) {
        case FWL_MouseCommand::LeftButtonDown:
          OnLButtonDown(pMsg);
          break;
        case FWL_MouseCommand::LeftButtonUp:
          OnLButtonUp(pMsg);
          break;
        case FWL_MouseCommand::Move:
          OnMouseMove(pMsg);
          break;
        case FWL_MouseCommand::Leave:
          OnMouseLeave(pMsg);
          break;
        default:
          break;
      }
      break;
    }
    case CFWL_Message::Type::Key: {
      CFWL_MessageKey* pKey = static_cast<CFWL_MessageKey*>(pMessage);
      if (pKey->m_dwCmd == FWL_KeyCommand::KeyDown)
        OnKeyDown(pKey);
      break;
    }
    default:
      break;
  }
  CFWL_Widget::OnProcessMessage(pMessage);
}