本文整理汇总了C++中CDXUTComboBox::GetSelectedData方法的典型用法代码示例。如果您正苦于以下问题:C++ CDXUTComboBox::GetSelectedData方法的具体用法?C++ CDXUTComboBox::GetSelectedData怎么用?C++ CDXUTComboBox::GetSelectedData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDXUTComboBox
的用法示例。
在下文中一共展示了CDXUTComboBox::GetSelectedData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnKeyboard
// Handle key presses
void CALLBACK OnKeyboard( UINT nChar, bool bKeyDown, bool bAltDown, void* pUserContext )
{
if( bKeyDown )
{
switch( nChar )
{
case VK_F1:
gShowHelp = !gShowHelp; break;
case VK_TAB:
{
CDXUTComboBox *comboBox = gSampleUI.GetComboBox(IDC_IMAGEVIEW);
if (eImageView_Uncompressed == (intptr_t)comboBox->GetSelectedData())
{
comboBox->SetSelectedByData((void*)eImageView_Compressed);
}
else if (eImageView_Compressed == (intptr_t)comboBox->GetSelectedData())
{
comboBox->SetSelectedByData((void*)eImageView_Uncompressed);
}
gSampleUI.SendEvent(IDC_IMAGEVIEW, true, comboBox);
break;
}
}
}
}
示例2: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
CDXUTComboBox* pComboBox = NULL;
CDXUTComboBox* pAABBLevelComboBox = NULL;
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
case IDC_SCENERASTERIZER_MODE:
//CDXUTComboBox* pComboBox = NULL;
pComboBox = ( CDXUTComboBox* )pControl;
g_eSceneRasterizerMode = ( UINT )PtrToInt( pComboBox->GetSelectedData() );
break;
case IDC_AABBSUBLEVEL:
pAABBLevelComboBox = ( CDXUTComboBox* )pControl;
g_CurrentAABBLevel = ( UINT )PtrToInt( pAABBLevelComboBox->GetSelectedData() );
break;
}
}
示例3: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_TOGGLE_BLUR:
g_bUseMotionBlur = !g_bUseMotionBlur;
break;
case IDC_RENDER_OGRE:
g_bRenderOgre = !g_bRenderOgre;
break;
case IDC_SAMPLE_COUNT:
{
CDXUTComboBox* pComboBox = ( CDXUTComboBox* )pControl;
g_MSAASampleCount = ( UINT )PtrToInt( pComboBox->GetSelectedData() );
HRESULT hr = S_OK;
ID3D10Device* pd3dDevice = DXUTGetD3D10Device();
if( pd3dDevice )
V( CreateRenderTarget( pd3dDevice, g_BackBufferWidth, g_BackBufferHeight, g_MSAASampleCount, 0 ) );
}
break;
}
}