Changing The Colors Of Runtime Created Controls...

Started by
1 comment, last by WhErE Is My MiNd 20 years, 1 month ago
I am tryin to create a static control at runtime with the code below. It comes up fine but I cannot find any way of changing the background color so it matches up with the bg color of the parent window. Can anyone point me in the right direction?

case WM_CREATE:
{

HWND something = CreateWindowEx(WS_EX_TRANSPARENT, "STATIC", "", WS_CHILD | WS_VISIBLE, 0, 0, 100, 100, hwnd, (HMENU)test, GetModuleHandle(NULL), NULL);

SetDlgItemText(hwnd, something, "This is a test");

break;
}
[edited by - WhErE Is My MiNd on March 6, 2004 3:09:25 PM] [edited by - WhErE Is My MiNd on March 6, 2004 3:37:58 PM]
//+++++++++++++++++++++++++++No Morals//+++++++++++++++++++++++++++
Advertisement
Handle WM_CTRLCOLORSTATIC

Thanks Salsa!Colin Jeanne | Invader''s Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud
Thx got it to work now
//+++++++++++++++++++++++++++No Morals//+++++++++++++++++++++++++++

This topic is closed to new replies.

Advertisement