1

I'm developing an Internet Explorer toolbar and I want to place a combobox I create on my toolbar.

HWND combobox1=CreateWindow(_T("COMBOBOX"), _T("combobox"), WS_BORDER |
        WS_VISIBLE | WS_CHILD | CBS_DROPDOWN, 10, 0, 200,
        250, m_hWnd, (HMENU) NULL,NULL , NULL);

And that works correctly, but the combobox is styled in the Windows Classic way, and I want to have it use the Windows Aero theme. I've tried this:

#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")`

Image

But nothing changes. (I tried this on a simple Win32 app and the style worked fine, but in the DLL on the toolbar the style doesn't get set)

Here's a simple example.

Ry-
  • 218,210
  • 55
  • 464
  • 476

1 Answers1

2

Adding a comctl32 manifest to a DLL loaded into another process doesn't impact the default activiation context that was established by the EXE.

Instead, your DLL will need to activate it's activation context when it is called. See CreateActCtx, ActivateActCtx. You will then DeactivateActCtx in each method before you return to IE and ReleaseActCtx when you shut down.

A cheap/quick way of doing this is ISOLATION_AWARE_ENABLED.

Martyn

Martyn Lovell
  • 2,086
  • 11
  • 13
  • Martyn plz help ) you can change my simple example ? i googling about CreateActCtx and i not understand how change my example – Дима Савичев May 25 '11 at 03:28
  • Sadly, I don't have time to do that. But searching for ISOLATION_AWARE_ENABLED will show you a relatively simple approach. And I should also add that browser toolbars are very security-sensitive and performance-sensitive components. So if you're not comfortable with Win32 you probably need to find a local mentor who can help ensure your toolbar is safe. – Martyn Lovell May 25 '11 at 03:43
  • fnks i found info about ISOLATION_AWARE_ENABLED and resolve my problem – Дима Савичев May 25 '11 at 07:31