Beispiel #1
0
BOOL CSchemaCombo::PreTranslateMessage(MSG* pMsg)
{
	if ( pMsg->message == WM_KEYDOWN )
	{
		if ( pMsg->wParam == VK_SPACE || pMsg->wParam == VK_RETURN )
		{
			if ( GetDroppedState() )
			{
				if ( ! OnClickItem( GetCurSel(), TRUE ) )
				{
					ShowDropDown( FALSE );
				}
				return TRUE;
			}
			else if ( pMsg->wParam == VK_SPACE )
			{
				ShowDropDown();
				return TRUE;
			}
		}
		else if ( pMsg->wParam == VK_DOWN )
		{
			if ( OnClickItem( GetCurSel() + 1, TRUE ) )
			{
				return TRUE;
			}
		}
	}
	return CComboBox::PreTranslateMessage( pMsg );
}
Beispiel #2
0
void CPlugToolBar::OnLButtonUp(UINT , CPoint )
{
    if (m_iPressed != -1)
    {
        int i = m_iPressed;
        m_iPressed = -1;
        InvalidateItem (i);
        OnClickItem (i);
    }
}
Beispiel #3
0
// -------------------------------------------------------------------------
// 功能	: 窗口函数
// -------------------------------------------------------------------------
int KUiStall::WndProc(unsigned int uMsg, unsigned int uParam, int nParam)
{
	switch(uMsg)
	{
	case WND_N_LEFT_CLICK_ITEM:
			OnClickItem((KUiDraggedObject*)uParam);
		break;
	case WND_N_BUTTON_CLICK:
		if (uParam == (unsigned int)(KWndWindow*)&m_CloseBtn)
			CloseWindow(true);
		break;
	default:
		return KWndShowAnimate::WndProc(uMsg, uParam, nParam);
	}
	return 0;
}