예제 #1
0
LRESULT CClientDlg::OnClientRClick( WPARAM wp, LPARAM lp )
{

	int iItem = m_TextWinList1.GetCurSel( );
	if( iItem >= 0 )
	{
		CKeysDialog d;
		d.m_pClientTmp =m_pClient;
		d.id= m_TextWinList1.GetItemData1( iItem );
		#ifndef FullVersion
		if (d.id==0) return 0;
		#endif
		d.iCord.x= (int)wp;
		d.iCord.y= (int)lp;
		if( d.DoModal() == IDOK )
		{
			OnLbnSelchangeWindowList();
		}
	}
	return 0;
}
예제 #2
0
void CBibitemView::OnPopupCrossref() 
{
	CKeysDialog dlg;
	dlg.SetBibList(GetDocument()->m_BibFile);
	if (dlg.DoModal() == IDOK) {
		CString key = dlg.m_SelKey;
		if (!key.IsEmpty()) {
			CField *cr = m_TmpItem->Find(STR_CROSSREF);
			if (cr) {
				// Has already crossref field
				cr->SetValue(key);
				int inx = GetItemIndex(cr);
				if (inx != -1)
					m_ListFields.SetItemText(inx, 1, key);
			} else {
				// Add the field
				AddField(STR_CROSSREF, key, FALSE);
			}
			SetModified(TRUE);
		}
	}
}