Jump to content


Cry for Win32 help!!!!!!


  • You cannot reply to this topic
3 replies to this topic

#1 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1052 posts

Posted 06 April 2006 - 04:22 PM

Guy, please, I'm desperate!!! I create a tab control in my application and, because I use the XP visual styles in my application, it gets the correct background color. However neither the dialog boxes I use for tabs, nor the controls on them have this background color (as it would be correct for a child window...). So the result is a very ugly tab control in which the tabs have the old gray color while the control itselfs has a white one. Could someone tell me some steps to make the background colors match? I'm using C, thank you!

#2 Axel

    Valued Member

  • Members
  • PipPipPip
  • 119 posts

Posted 06 April 2006 - 10:11 PM

How did you activate the use of the new comctrl32.dll? Did you embed a manifest?

#3 rued

    New Member

  • Members
  • Pip
  • 4 posts

Posted 06 April 2006 - 11:52 PM

Hi Michail,

I think the code below is what you need!?

Talk to you
Thomas Rued

#define ETDT_DISABLE        0x00000001

#define ETDT_ENABLE         0x00000002

#define ETDT_USETABTEXTURE  0x00000004

#define ETDT_ENABLETAB      (ETDT_ENABLE  | ETDT_USETABTEXTURE)


typedef HRESULT STDAPICALLTYPE EnableThemeDialogTextureFn( HWND hwnd, DWORD dwFlags );


static HINSTANCE themeDllHandle = ::LoadLibrary( "UxTheme.dll" );


void setTabTextureAsDialogBg(HWND window)

{

	if (themeDllHandle != 0)

	{

		EnableThemeDialogTextureFn*  pEnableThemeDialogTexture = reinterpret_cast<EnableThemeDialogTextureFn*>(::GetProcAddress(themeDllHandle, "EnableThemeDialogTexture"));


		if (pEnableThemeDialogTexture != NULL)

		{

			pEnableThemeDialogTexture(window, ETDT_ENABLETAB);

			ShowWindow(window,SW_HIDE);

			ShowWindow(window,SW_SHOW);

		}

	}

}


#4 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1052 posts

Posted 07 April 2006 - 10:46 AM

Thank you, Thomas, this is exactly what I needed :yes: You saved me! :w00t:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users