■MFC相談室 mfc20d.dll■at TECH
■MFC相談室 mfc20d.dll■ - 暇つぶし2ch311:デフォルトの名無しさん
09/02/05 19:10:33
>>310
サンプルのだけど
CMFCToolBarComboBoxButton* pSrcCombo = NULL;
CObList listButtons;
if (CMFCToolBar::GetCommandButtons(ID_DUMMY_SELECT_ACTIVE_CONFIGURATION, listButtons) > 0)
{
for (POSITION posCombo = listButtons.GetHeadPosition(); pSrcCombo == NULL && posCombo != NULL;)
{
CMFCToolBarComboBoxButton* pCombo = DYNAMIC_DOWNCAST(CMFCToolBarComboBoxButton, listButtons.GetNext(posCombo));

if (pCombo != NULL && CMFCToolBar::IsLastCommandFromButton(pCombo))
{
pSrcCombo = pCombo;
}
}
}
if (pSrcCombo != NULL)
{
ASSERT_VALID(pSrcCombo);

LPCTSTR lpszSelItem = pSrcCombo->GetItem();
CString strSelItem = (lpszSelItem == NULL) ? _T("") : lpszSelItem;
AfxMessageBox(strSelItem);
}
else
{
AfxMessageBox(_T("Show \"Set Active Configuration\" dialog...."));
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch