开发者

windows 7 style for combobox on internet explorer toolbar, how?

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 | 开发者_StackOverflowWS_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='*'\"")`

windows 7 style for combobox on internet explorer toolbar, how?

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜