BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Professional Edition
 Icon on disabled button (visual style)
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

tomaskrasa

27 Posts

Posted - 07/03/2022 :  01:59:23 AM  Show Profile  Reply with Quote
Hello

Inside CBCGPFormView i have several buttons.

Without EnableVisualManagerStyle() icon on disabled button

(only 1 icon set to button - via message BM_SETIMAGE)

With EnableVisualManagerStyle() icon on disabled button

It is ugly.

Is there easy way how to show icon on disabled button same way as without visual style ?

Thanks

Edited by - tomaskrasa on 07/03/2022 02:12:36 AM

Support

4208 Posts

Posted - 07/03/2022 :  04:32:01 AM  Show Profile  Visit Support's Homepage  Reply with Quote
Hello,

Thank you for contacting us!

First, we're kindly asking to read our forum rules:
https://bcgsoft.com/cgi-bin/forum/topic.asp?TOPIC_ID=8230:

3. If the problem cannot be reproduced in our examples/samples, please open a new support ticket (https://support.bcgsoft.com/) and attach your sample where we can see the problem.

As you can see in our BCGPcontrols example, disabled push button (with visual style) created in the form view is displayed properly:



So, please open a new ticket and attach the repro sample.

Best regards,

BCGSoft Technical Support
Go to Top of Page

tomaskrasa

27 Posts

Posted - 07/03/2022 :  06:17:06 AM  Show Profile  Reply with Quote
Thank for fast reply.

I have explored BCGPControls example - Static text and picture page.

It work as expected for PNG bitmap in example.
But it does not work for icon bitmap.

If i change:
StaticControlsView.cpp line 114

from PNG bitmap:
m_wndStartAnimation.SetImage(IDB_PLAY32); // use PNG bitmap

to icon:
HICON h_ico = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_INFO), IMAGE_ICON, 16, 16, LR_SHARED);
m_wndStartAnimation.SetImage(h_ico);

it work same way as in my first post (ugly full gray icon if button disabled)
Go to Top of Page

Support

4208 Posts

Posted - 07/04/2022 :  02:18:05 AM  Show Profile  Visit Support's Homepage  Reply with Quote
Hi,

The icon should be 32bpp:

m_wndStartAnimation.SetImage(h_ico, TRUE, NULL, NULL, TRUE);



Best regards,

BCGSoft Technical Support
Go to Top of Page

tomaskrasa

27 Posts

Posted - 07/04/2022 :  04:02:21 AM  Show Profile  Reply with Quote
Thank you very much for help.

Great library and excelent support.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000