Пример #1
0
void CuEditableListCtrlGeneric::OnRButtonDown(UINT nFlags, CPoint point) 
{
	int   index, iColumnNumber = 1;
	int   iItem   = -1, iSubItem = -1;
	int   iNumMin = 0;
	int   iNumMax = 400;
	CRect rect, rCell;
	UINT  flags;
	
	index = HitTest (point, &flags);
	if (index < 0)
		return;
	GetItemRect (index, rect, LVIR_BOUNDS);
	if (!GetCellRect (rect, point, rCell, iColumnNumber))
		return;
	
	if (rect.PtInRect (point))
		CuListCtrl::OnRButtonDown(nFlags, point);
	rCell.top    -= 2;
	rCell.bottom += 2;
	HideProperty();
	if (iColumnNumber != 1)
		return;
	EditValue (index, iColumnNumber, rCell);
}
BOOL CTabCharacteristicsDlg::EditValue(CComboBox &cb, WORD &wValue, BOOL &bKnownFlag, int nPad)
{
	DWORD dwValue = wValue;
	if (!EditValue(cb,dwValue,bKnownFlag,nPad))
		return(FALSE);

	wValue = (WORD)dwValue;
	return(TRUE);
}
Пример #3
0
void CuEditableListCtrlDuplicateDbSelectLocation::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	int   index, iColumnNumber;
	int   iItem   = -1, iSubItem = -1;
	int   iNumMin = 0;
	int   iNumMax = 400;
	CRect rect, rCell;
	UINT  flags;
	
	index = HitTest (point, &flags);
	if (index < 0)
		return;
	GetItemRect (index, rect, LVIR_BOUNDS);
	if (!GetCellRect (rect, point, rCell, iColumnNumber))
		return;
	
	rCell.top    -= 2;
	rCell.bottom += 2;
	HideProperty();
	EditValue (index, iColumnNumber, rCell);
}
void CTabCharacteristicsDlg::OnSetvalueEnemyally() 
{
	EditValue(m_cbEnemyAlly,m_chEnemyAlly,m_bEnemyAlly,2);
}
void CTabCharacteristicsDlg::OnSetvalueRace() 
{
	EditValue(m_cbRace,m_chRace,m_bRace,2);
}
void CTabCharacteristicsDlg::OnSetvalueKit() 
{
	EditValue(m_cbKit,m_dwKit,m_bKit,8);
}
void CTabCharacteristicsDlg::OnSetvalueGender() 
{
	EditValue(m_cbGender,m_chGender,m_bGender,2);
}
void CTabCharacteristicsDlg::OnSetvalueEnemy() 
{
	EditValue(m_cbRacialEnemy,m_chRacialEnemy,m_bRacialEnemy,2);
}
void CTabCharacteristicsDlg::OnSetvalueClass() 
{
	EditValue(m_cbClass,m_chClass,m_bClass,2);
}
void CTabCharacteristicsDlg::OnSetvalueAlignment() 
{
	EditValue(m_cbAlignment,m_chAlignment,m_bAlignment,2);
}