当前位置: 首页>>代码示例>>C++>>正文


C++ CDXUTDialog::GetStatic方法代码示例

本文整理汇总了C++中CDXUTDialog::GetStatic方法的典型用法代码示例。如果您正苦于以下问题:C++ CDXUTDialog::GetStatic方法的具体用法?C++ CDXUTDialog::GetStatic怎么用?C++ CDXUTDialog::GetStatic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDXUTDialog的用法示例。


在下文中一共展示了CDXUTDialog::GetStatic方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RenderArrows

void RenderArrows(float fElapsedTime)
{
    WCHAR strWhite[MAX_PATH] = {26};
    WCHAR strBlack[MAX_PATH] = {27};
    CDXUTStatic* pStatic = NULL;

    pStatic = g_WhiteArrowDialog.GetStatic(IDC_WHITESCORE);
    if(pStatic != NULL)
    {
        pStatic->SetText(strWhite);
    }

    pStatic = g_BlackArrowDialog.GetStatic(IDC_BLACKSCORE);
    if(pStatic != NULL)
    {
        pStatic->SetText(strBlack);
    }

	if(!g_Board.pRenjuGame->bGameIsFinished)
	{
		if(g_Board.pRenjuGame->activeColor == White)
		{
			g_WhiteArrowDialog.OnRender(fElapsedTime);
		}
		if(g_Board.pRenjuGame->activeColor == Black)
		{
			g_BlackArrowDialog.OnRender(fElapsedTime);
		}
	}
}
开发者ID:Bastila,项目名称:c-plus-plus-examples,代码行数:30,代码来源:NsRenju.cpp

示例2: 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_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;

        case IDC_ENABLE_PRESHADER:
        {
            g_bEnablePreshader = g_SampleUI.GetCheckBox( IDC_ENABLE_PRESHADER )->GetChecked();

            if( DXUTGetD3D9Device() != NULL )
            {
                OnLostDevice( NULL );
                OnDestroyDevice( NULL );
                OnCreateDevice( DXUTGetD3D9Device(), DXUTGetD3D9BackBufferSurfaceDesc(), NULL );
                OnResetDevice( DXUTGetD3D9Device(), DXUTGetD3D9BackBufferSurfaceDesc(), NULL );
            }
            break;
        }

        case IDC_ACTIVE_LIGHT:
            if( !g_LightControl[g_nActiveLight].IsBeingDragged() )
            {
                g_nActiveLight++;
                g_nActiveLight %= g_nNumActiveLights;
            }
            break;

        case IDC_NUM_LIGHTS:
            if( !g_LightControl[g_nActiveLight].IsBeingDragged() )
            {
                WCHAR sz[100];
                swprintf_s( sz, 100, L"# Lights: %d", g_SampleUI.GetSlider( IDC_NUM_LIGHTS )->GetValue() );
                g_SampleUI.GetStatic( IDC_NUM_LIGHTS_STATIC )->SetText( sz );

                g_nNumActiveLights = g_SampleUI.GetSlider( IDC_NUM_LIGHTS )->GetValue();
                g_nActiveLight %= g_nNumActiveLights;
            }
            break;

        case IDC_LIGHT_SCALE:
            g_fLightScale = ( float )( g_SampleUI.GetSlider( IDC_LIGHT_SCALE )->GetValue() * 0.10f );

            WCHAR sz[100];
            swprintf_s( sz, 100, L"Light scale: %0.2f", g_fLightScale );
            g_SampleUI.GetStatic( IDC_LIGHT_SCALE_STATIC )->SetText( sz );
            break;
    }

}
开发者ID:KNeal,项目名称:Oculus,代码行数:59,代码来源:BasicHLSL.cpp

示例3: setVisibleCustomControls

void setVisibleCustomControls(bool visible) {
    hud.GetStatic(IDC_THRESHOLD_LABEL)->SetVisible(visible);
    hud.GetSlider(IDC_THRESHOLD)->SetVisible(visible);
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_LABEL)->SetVisible(visible);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS)->SetVisible(visible);
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_DIAG_LABEL)->SetVisible(visible);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS_DIAG)->SetVisible(visible);
    hud.GetStatic(IDC_CORNER_ROUNDING_LABEL)->SetVisible(visible);
    hud.GetSlider(IDC_CORNER_ROUNDING)->SetVisible(visible);
}
开发者ID:kphillisjr,项目名称:smaa,代码行数:10,代码来源:Demo.cpp

示例4: initApp

void initApp() {
    hud.Init(&dialogResourceManager);

    hud.SetCallback(onGUIEvent); int iY = 10;
    hud.AddButton(IDC_TOGGLE_FULLSCREEN, L"Toggle full screen", 35, iY, HUD_WIDTH, 22);

    iY += 24;

    hud.AddComboBox(IDC_PRESET, 35, iY += 24, HUD_WIDTH, 22, 0, false);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Low", (LPVOID) 0);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Medium", (LPVOID) 1);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA High", (LPVOID) 2);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Ultra", (LPVOID) 3);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Custom", (LPVOID) 4);
    hud.GetComboBox(IDC_PRESET)->SetSelectedByData((LPVOID) 2);

    hud.AddComboBox(IDC_DETECTION_MODE, 35, iY += 24, HUD_WIDTH, 22, 0, false);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Luma edge det.", (LPVOID) 0);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Color edge det.", (LPVOID) 1);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Depth edge det.", (LPVOID) 2);

    hud.AddCheckBox(IDC_ANTIALIASING, L"SMAA Anti-Aliasing", 35, iY += 24, HUD_WIDTH, 22, true);
    hud.AddCheckBox(IDC_PROFILE, L"Profile", 35, iY += 24, 125, 22, false);
    wstringstream s;
    s << L"Threshold: " << commandlineOptions.threshold;
    hud.AddStatic(IDC_THRESHOLD_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_THRESHOLD, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.threshold / 0.5f));
    hud.GetStatic(IDC_THRESHOLD_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_THRESHOLD)->SetVisible(false);

    s = wstringstream();
    s << L"Max Search Steps: " << commandlineOptions.searchSteps;
    hud.AddStatic(IDC_MAX_SEARCH_STEPS_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_MAX_SEARCH_STEPS, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.searchSteps / 98.0f));
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS)->SetVisible(false);

    s = wstringstream();
    s << L"Max Diag. Search Steps: " << commandlineOptions.diagSearchSteps;
    hud.AddStatic(IDC_MAX_SEARCH_STEPS_DIAG_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_MAX_SEARCH_STEPS_DIAG, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.diagSearchSteps / 20.0f));
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_DIAG_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS_DIAG)->SetVisible(false);

    s = wstringstream();
    s << L"Corner Rounding: " << commandlineOptions.cornerRounding;
    hud.AddStatic(IDC_CORNER_ROUNDING_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_CORNER_ROUNDING, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.cornerRounding / 100.0f));
    hud.GetStatic(IDC_CORNER_ROUNDING_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_CORNER_ROUNDING)->SetVisible(false);
	
}
开发者ID:kphillisjr,项目名称:smaa,代码行数:52,代码来源:Demo.cpp

示例5:

//--------------------------------------------------------------------------------------
// Create any D3D9 resources that won't live through a device reset (D3DPOOL_DEFAULT) 
// or that are tied to the back buffer size 
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D9ResetDevice( IDirect3DDevice9* pd3dDevice,
                                    const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext )
{
    HRESULT hr;

    V_RETURN( g_DialogResourceManager.OnD3D9ResetDevice() );
    V_RETURN( g_SettingsDlg.OnD3D9ResetDevice() );


    // Setup the camera's projection parameters
	camera->OnResetDevice(pBackBufferSurfaceDesc);


    g_HUD.SetLocation( pBackBufferSurfaceDesc->Width - 350, 0 );
    g_HUD.SetSize( 360, 100 );
	g_HUD.GetEditBox(IDC_CMD)->SetLocation(5,pBackBufferSurfaceDesc->Height-30);
	g_HUD.GetStatic(IDC_STATIC7)->SetLocation(5,pBackBufferSurfaceDesc->Height-60);

    g_SampleUI.SetLocation( pBackBufferSurfaceDesc->Width - 350, 130 );
	g_SampleUI.SetSize( 350, pBackBufferSurfaceDesc->Height - 130 );

	//clear black part of screen
	clearRect.x1 = pBackBufferSurfaceDesc->Width - 360;
	clearRect.y1 = 0;
	clearRect.x2 = pBackBufferSurfaceDesc->Width;
	clearRect.y2 = pBackBufferSurfaceDesc->Height;

    return S_OK;
}
开发者ID:m10914,项目名称:Sphere,代码行数:33,代码来源:SimpleSample.cpp

示例6: OnGUIEvent

//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, 
                          void* pUserContext )
{
    if( g_bGuiVisible )
    {
        switch( nControlID )
        {
            case IDC_TOGGLEFULLSCREEN:
                DXUTToggleFullScreen(); break;
            case IDC_TOGGLEREF:
                DXUTToggleREF(); break;
            case IDC_CHANGEDEVICE:
                g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
            case IDC_SUNWIDTH_SLIDER:
                WCHAR temp[64];
                int iVal = g_HUD.GetSlider( IDC_SUNWIDTH_SLIDER )->GetValue();

                g_fSunWidth = ( float( iVal ) / 100.0f ) * 3.0f;
                swprintf_s( temp, L"SunWidth = %2.2f", g_fSunWidth );
                g_HUD.GetStatic( IDC_SUNWIDTH_TEXT )->SetText( temp );

                break;
        }
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:28,代码来源:ContactHardeningShadows11.cpp

示例7: 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_TOGGLESPIN:
        {
            g_bSpinning = g_SampleUI.GetCheckBox( IDC_TOGGLESPIN )->GetChecked();
            break;
        }

        case IDC_EXPLODE_SCALE:
        {
            WCHAR sz[100];
            g_fExplode = ( float )( g_SampleUI.GetSlider( IDC_EXPLODE_SCALE )->GetValue() * 0.01f );
            swprintf_s( sz, 100, L"Explode Amount: %0.2f", g_fExplode );
            g_SampleUI.GetStatic( IDC_EXPLODE_STATIC )->SetText( sz );
            g_pExplodeVariable->SetFloat( g_fExplode );
            break;
        }
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:32,代码来源:Tutorial13.cpp

示例8: RenderWinner

void RenderWinner(float fElapsedTime)
{
	if(g_Board.pRenjuGame->winner == Black)
	{
		WCHAR strMessage[MAX_PATH] = L"The Black have won!";
		CDXUTStatic* pStatic = NULL;
		CDXUTElement* pElement = NULL;

		pStatic = g_TheBlackWinnerDialog.GetStatic(IDC_THE_BLACK_WINNER_DIALOG);
		if(pStatic != NULL)
		{
			pStatic->SetText(strMessage);
		}
	        
		pElement = g_TheBlackWinnerDialog.GetDefaultElement(DXUT_CONTROL_STATIC, 0);
		pElement->FontColor.Init(D3DCOLOR_ARGB(255, 255, 255, 255));
		
		g_TheBlackWinnerDialog.OnRender(fElapsedTime);
	}
	else
	{
		if(g_Board.pRenjuGame->winner == White)
		{
			WCHAR strMessage[MAX_PATH] = L"The White have won!";
			CDXUTStatic* pStatic = NULL;
			CDXUTElement* pElement = NULL;

			pStatic = g_TheWhiteWinnerDialog.GetStatic(IDC_THE_WHITE_WINNER_DIALOG);
			if(pStatic != NULL)
			{
				pStatic->SetText(strMessage);
			}
		        
			pElement = g_TheWhiteWinnerDialog.GetDefaultElement(DXUT_CONTROL_STATIC, 0);
			pElement->FontColor.Init(D3DCOLOR_ARGB(255, 0, 0, 0));
			
			g_TheWhiteWinnerDialog.OnRender(fElapsedTime);
		}
	}
}
开发者ID:Bastila,项目名称:c-plus-plus-examples,代码行数:40,代码来源:NsRenju.cpp

示例9: OnFrameMove

//--------------------------------------------------------------------------------------
// Handle updates to the scene.  This is called regardless of which D3D API is used
//--------------------------------------------------------------------------------------
void CALLBACK OnFrameMove( double fTime, float fElapsedTime, void* pUserContext )
{

	manipulator->FrameMove(fElapsedTime, fTime);

	if(iGradientStep != -1) GradientCalculus();

	wchar_t* report = manipulator->GetReport();
	if(report != NULL)
	{
		g_HUD.GetStatic(IDC_STATIC7)->SetText(report);
	}

	Pick();
}
开发者ID:m10914,项目名称:Sphere,代码行数:18,代码来源:SimpleSample.cpp

示例10: GradientCalculus

int GradientCalculus()
{
	int res = manipulator->GetLimbGradient(wcGradientLimbName,cGradientFilename,iGradientUserStep,iGradientStep);

	if(res == -1)
	{
		iGradientStep == -1;
		g_HUD.GetStatic(IDC_STATIC7)->SetText(L"Gradients processed");
	}
	else
	{
		iGradientStep++;

		int dimension = (int)ceil(2.f*manipulator->GetLimbLength(wcGradientLimbName)/iGradientUserStep);
		dimension = dimension*dimension*dimension;

		wchar_t str[128];
		swprintf(str,L"Gradient processed: %d of %d", iGradientStep, dimension);
		g_HUD.GetStatic(IDC_STATIC7)->SetText(str);
	}
	

	return 0;
}
开发者ID:m10914,项目名称:Sphere,代码行数:24,代码来源:SimpleSample.cpp

示例11: 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_DIFF_STEPS:
		g_vsObj->diffSteps = g_SampleUI.GetSlider(IDC_DIFF_STEPS)->GetValue();
		WCHAR sz[100];
		StringCchPrintf(sz, 100, L"Diffusion steps: %d", g_vsObj->diffSteps);
		g_SampleUI.GetStatic(IDC_DIFF_STEPS_STATIC)->SetText(sz);
		break;
	}
}
开发者ID:maleiwhat,项目名称:vectorizing-project,代码行数:23,代码来源:VolSurfaces10.cpp

示例12: InitApp

// Initialize the app 
void InitApp()
{
	// Initialize dialogs
	gD3DSettingsDlg.Init(&gDialogResourceManager);
	gHUD.Init(&gDialogResourceManager);
	gSampleUI.Init(&gDialogResourceManager);

	gHUD.SetCallback(OnGUIEvent);
	int x = 0;
	int y = 10;
	gHUD.AddButton(IDC_TOGGLEFULLSCREEN, L"Toggle full screen", x, y, 170, 23);
	gHUD.AddButton(IDC_TOGGLEREF, L"Toggle REF (F3)", x, y += 26, 170, 23, VK_F3);
	gHUD.AddButton(IDC_CHANGEDEVICE, L"Change device (F2)", x, y += 26, 170, 23, VK_F2);
	gHUD.SetSize( 170, 170 );
	
	gSampleUI.SetCallback(OnGUIEvent);
	x = 0;
	y = 0;
    gSampleUI.AddStatic(IDC_TEXT, L"", x, y, 1, 1); y += 5*22;
	gSampleUI.AddComboBox(IDC_PROFILE, x, y, 226, 22); y += 26;
	gSampleUI.AddCheckBox(IDC_MT, L"Multithreaded", x, y, 125, 22, gMultithreaded);
	gSampleUI.AddButton(IDC_RECOMPRESS, L"Recompress", x + 131, y, 125, 22); y += 26;
	gSampleUI.AddComboBox(IDC_IMAGEVIEW, x, y, 145, 22);
    gSampleUI.AddCheckBox(IDC_ALPHA, L"Show Alpha", x + 151, y, 105, 22); y += 26;
    gSampleUI.AddSlider(IDC_EXPOSURE, x, y, 250, 22); y += 26;
	gSampleUI.AddButton(IDC_LOAD_TEXTURE, L"Load Texture", x, y, 125, 22);
	gSampleUI.AddButton(IDC_SAVE_TEXTURE, L"Save Texture", x + 131, y, 125, 22); y += 26;

	gSampleUI.SetSize( 276, y+150 );

	{
		CDXUTComboBox *comboBox = gSampleUI.GetComboBox(IDC_IMAGEVIEW);
		comboBox->AddItem(L"Uncompressed", (void *)(eImageView_Uncompressed));
		comboBox->AddItem(L"Compressed", (void *)(eImageView_Compressed));
		//comboBox->AddItem(L"Error", (void *)(eImageView_Error));
		//comboBox->AddItem(L"All", (void *)(eImageView_All));
		comboBox->SetSelectedByData((void *)(gImageView));
	}

	gSampleUI.SendEvent(IDC_TEXT, true, gSampleUI.GetStatic(IDC_TEXT));
}
开发者ID:Nuos,项目名称:ISPCTextureCompressor,代码行数:42,代码来源:main.cpp

示例13: on_render

        void CALLBACK on_render(ID3D11Device* device, ID3D11DeviceContext* context, double fTime, float fElapsedTime, void* pUserContext)
        {
            if (!enabled)
                return;

            // get FPS
            dune::tstringstream ss;
            ss << DXUTGetFPS() << L"(" << std::setprecision(2) << DXUTGetElapsedTime() * 1000 << L"ms)" << std::endl;
            hud.GetStatic(IDC_FPS_COUNTER)->SetText(ss.str().c_str());

            for (size_t i = 0; i < dlg_manager.m_Dialogs.size(); ++i)
            {
                auto h = dlg_manager.m_Dialogs[i];

                // make sure HUD is rendered last
                if (h != &hud)
                    h->OnRender(fElapsedTime);
            }

            hud.OnRender(fElapsedTime);
        }
开发者ID:thefranke,项目名称:dirtchamber,代码行数:21,代码来源:common_gui.cpp

示例14: OnGUIEvent

//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
    switch( nControlID )
    {
            // Standard DXUT controls
        case IDC_TOGGLEFULLSCREEN:
            DXUTToggleFullScreen(); break;
        case IDC_TOGGLEREF:
            DXUTToggleREF(); break;
        case IDC_CHANGEDEVICE:
            g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;

            // Custom app controls
        case IDC_PATCH_SUBDIVS:
        {
            g_fSubdivs = g_SampleUI.GetSlider( IDC_PATCH_SUBDIVS )->GetValue() / 10.0f;

            WCHAR sz[100];
            swprintf_s( sz, L"Patch Divisions: %2.1f", g_fSubdivs );
            g_SampleUI.GetStatic( IDC_PATCH_SUBDIVS_STATIC )->SetText( sz );
        }
            break;
        case IDC_TOGGLE_LINES:
            g_bDrawWires = g_SampleUI.GetCheckBox( IDC_TOGGLE_LINES )->GetChecked();
            break;
        case IDC_PARTITION_INTEGER:
            g_iPartitionMode = PARTITION_INTEGER;
            break;
        case IDC_PARTITION_FRAC_EVEN:
            g_iPartitionMode = PARTITION_FRACTIONAL_EVEN;
            break;
        case IDC_PARTITION_FRAC_ODD:
            g_iPartitionMode = PARTITION_FRACTIONAL_ODD;
            break;
    }
}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:39,代码来源:SimpleBezier11.cpp

示例15: OnChainSelect

//------------------------------------------------------------------------
// Name: OnChainSelect
// Desc: event handler for select one of chains
//------------------------------------------------------------------------
HRESULT OnChainSelect(int iID)
{
	if(iID >= 0)
	{
		wchar_t str[256];
		cprimitive* chain = manipulator->cube[iID];
		
		g_SampleUI.SetVisible(true);

		swprintf(str,L"You picked chain # %d",iID);
		g_SampleUI.GetStatic( IDC_OBJNAME )->SetText(str);

		g_SampleUI.GetSlider(IDC_WIDTH_SLIDER)->SetValue(chain->fWidth);

		swprintf(str,L"%.2f",chain->fWidth);
		g_SampleUI.GetEditBox( IDC_WIDTH )->SetText(str);

		g_SampleUI.GetSlider(IDC_LENGTH_SLIDER)->SetValue(chain->fLength);

		swprintf(str,L"%.2f",chain->fLength);
		g_SampleUI.GetEditBox( IDC_LENGTH )->SetText(str);

		swprintf(str,L"%.2f",chain->restrictAngleX.x);
		g_SampleUI.GetEditBox( IDC_ANGLE_RESTRICT_XL )->SetText(str);
		swprintf(str,L"%.2f",chain->restrictAngleX.y);
		g_SampleUI.GetEditBox( IDC_ANGLE_RESTRICT_XU )->SetText(str);
		swprintf(str,L"%.2f",chain->restrictAngleY.x);
		g_SampleUI.GetEditBox( IDC_ANGLE_RESTRICT_YL )->SetText(str);
		swprintf(str,L"%.2f",chain->restrictAngleY.y);
		g_SampleUI.GetEditBox( IDC_ANGLE_RESTRICT_YU )->SetText(str);

		swprintf(str,L"%.2f",chain->vOffset.x);
		g_SampleUI.GetEditBox( IDC_OFFSET_X )->SetText(str);
		swprintf(str,L"%.2f",chain->vOffset.y);
		g_SampleUI.GetEditBox( IDC_OFFSET_Y )->SetText(str);
		swprintf(str,L"%.2f",chain->vOffset.z);
		g_SampleUI.GetEditBox( IDC_OFFSET_Z )->SetText(str);

		swprintf(str,L"%.2f",chain->fDisplace);
		g_SampleUI.GetEditBox( IDC_DISPLACE )->SetText(str);
		swprintf(str,L"%.2f",chain->fDirection);
		g_SampleUI.GetEditBox( IDC_DIRECTION )->SetText(str);
		swprintf(str,L"%.2f",chain->fCoefficient);
		g_SampleUI.GetEditBox( IDC_COEFFICIENT )->SetText(str);
		swprintf(str,L"%.2f",chain->fMass);
		g_SampleUI.GetEditBox( IDC_MASS )->SetText(str);

		g_SampleUI.GetCheckBox( IDC_TILT )->SetChecked(chain->bTilt);
		g_SampleUI.GetCheckBox( IDC_PRESSURE )->SetChecked(chain->bPressure);
		g_SampleUI.GetCheckBox( IDC_LASER )->SetChecked(chain->bLaser);


		swprintf(str,L"X: %.2f",chain->vAngle.x);
		g_SampleUI.GetStatic( IDC_STATIC7 )->SetText(str);
		swprintf(str,L"Y: %.2f",chain->vAngle.y);
		g_SampleUI.GetStatic( IDC_STATIC8 )->SetText(str);
	}
	else
	{
		g_SampleUI.SetVisible(false);
	}

	return S_OK;
}
开发者ID:m10914,项目名称:Sphere,代码行数:68,代码来源:SimpleSample.cpp


注:本文中的CDXUTDialog::GetStatic方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。