Sign in to follow this  

DX UI Static Controls

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to change the background color or put a texture/skin for static controls? I can change the bk color of the whole dialog but thats not what I want. Heres some code to look at... g_UI.AddStatic( IDC_MSG, L"Hello, Static ", 315, 410, 100, 200 ); g_UI.SetFont(1, L"Times New Roman", 15, NULL); pElementMsg = g_UI.GetStatic(IDC_MSG)->GetElement(0); pElementMsg->SetFont(1,D3DCOLOR_ARGB(255,255,255,255),DT_CENTER | DT_WORDBREAK); pElementMsg->Refresh(); pElementMsg = NULL;

Share this post


Link to post
Share on other sites
right now I'm rendering a sprite behind the static control that acts as a frame for making floating type captions. The sprite width is fixed and the height is adjusted based on the length of the string stored in the static control.

The problem is that not every character takes up the same amount of space. For example, when the string is in all caps, the frames(sprite) height is usually to short.

HeightScale = int(wcslen(m_Tiles[i].strDescr) / 15) + 1;

Share this post


Link to post
Share on other sites

This topic is 4395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this