コード例 #1
0
void CResultDataWnd::OnToolbarCommand(UINT ID)
{
	int index = m_wndToolBar.CommandToIndex(ID);
	CMFCToolBarComboBoxButton* pCtrl = (CMFCToolBarComboBoxButton*)m_wndToolBar.GetButton(index); 
	ASSERT(pCtrl);

	int sel = pCtrl->GetCurSel(); 
	m_grid.SetStatType(sel);
}
コード例 #2
0
void CTextPropertyToolBar::OnFontNameChanged()
{
	CMFCToolBarComboBoxButton *pButton = (CMFCToolBarComboBoxButton*)this->GetButton(GetButtonIndex(ID_FONTCOMBO_TEXT));
	CString name = pButton->GetItem(pButton->GetCurSel());
	m_pObserver->PropertyChanged(TextPropertyBuilder::CreateTextProperty(PropertyEnum_FontName, name));
}
コード例 #3
0
void CTextPropertyToolBar::OnFontSizeChanged()
{
	CMFCToolBarComboBoxButton *pButton = (CMFCToolBarComboBoxButton*)this->GetButton(GetButtonIndex(ID_SIZECOMBO_TEXT));
	CString size = pButton->GetItem(pButton->GetCurSel());
	m_pObserver->PropertyChanged(TextPropertyBuilder::CreateTextProperty<int>(PropertyEnum_FontSize, std::stoi(size.GetBuffer())));
}