Sign in to follow this  

Problem adding shield icon to buttons in my atl/wtl application

This topic is 3095 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

i, i'm have a problem with adding the shield icons to the buttons in my application. I am running under windows vista, using visual studio 2008 and it is a dll i am generating. I added the following code in the in the OnInitDialog() part: Button_SetElevationRequiredState(hwnd, TRUE); class ATL_NO_VTABLE MyClass: public CComObjectRootEx<CComSingleThreadModel>, public CComCoClass<MyClass , &CLSID_MyClass>, public IPropertyPageImpl<MyClass>, public CDialogImpl<MyClass>, public CWinDataExchange<MyClass> { BEGIN_MSG_MAP(MyClass) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) REFLECT_NOTIFICATIONS() END_MSG_MAP() }; MyClass::OnInitDialog() { Button_SetElevationRequiredState(hwnd, TRUE); HWND hwnd = GetDlgItem(IDC_RULE_BUTTON); int result = Button_SetElevationRequiredState(hwnd, TRUE); } I have added the manifest part to load Microsoft Common Controls 6.0: <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' /> </dependentAssembly> Using the dependency walker application to check the dll file generatedi can see that it is using two COMCTL32.DLL, one with file version 5.82 and another one with version 6.10. Can this cause problems in vista applications? Any other suggestions on what the problem can be?

Share this post


Link to post
Share on other sites

This topic is 3095 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