Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Transparent CExtButton Collapse All
Subject Author Date
Dominik Braendlin May 18, 2010 - 2:12 AM

Dear Tech Support,

I am using a CExtButton with a menu. I would like to modify the button that it does not stand out of its background (kind like the CExtIconButton). It should be transparent. Only the text and the little triangle for the menu should be showing. The rest should have the same color as the background.

How can I tweak the CExtButton to get such a result?

Thanks

Adrian

Technical Support May 20, 2010 - 1:59 PM

The CExtHyperLinkButton supports two modes:

1) The default mode. The click on the hyperlink button opens the associated URL.

2) The command mode. The click on the hyperlink button sends the WM_COMMAND message like the CExtButton push button control does. To switch the hyperlink button into this mode you should set its CExtHyperLinkButton::m_bUseStdCommandNotification flag property to true.

The second type of hyperlink button can be configured for displaying popup menu instead of sending the command message:

CExtHyperLinkButton & wndHyperLink1 = . . .
            wndHyperLink.m_bUseStdCommandNotification = true;
CMenu _menu;
            VERIFY( _menu.LoadMenu( IDR_YOUR_POPUP_MENU_RESOURCE ) );
            wndHyperLink.m_menu.Attach( _menu.Detach() );

Dominik Braendlin May 19, 2010 - 1:13 AM

Is there any example for such a transparent button? What do you mean with drop down or ellipsis button?

The CExtHyperLinkButton does not seem to have the menu feature. The HyperLinkButton with menu if pressing the text would be nice. Of course starting the web browser should be suppressed. Any example?

Thanks

Adrian

Technical Support Jun 7, 2010 - 11:20 AM

The CExtHyperLinkButton supports two modes:

1) The default mode. The click on the hyperlink button opens the associated URL.

2) The command mode. The click on the hyperlink button sends the WM_COMMAND message like the CExtButton push button control does. To switch the hyperlink button into this mode you should set its CExtHyperLinkButton::m_bUseStdCommandNotification flag property to true.

The second type of hyperlink button can be configured for displaying popup menu instead of sending the command message:

CExtHyperLinkButton & wndHyperLink1 = . . .
            wndHyperLink.m_bUseStdCommandNotification = true;
CMenu _menu;
            VERIFY( _menu.LoadMenu( IDR_YOUR_POPUP_MENU_RESOURCE ) );
            wndHyperLink.m_menu.Attach( _menu.Detach() );

Technical Support May 18, 2010 - 11:47 AM

The CExtButton is painted through a Prof-UIS paint manager which provides both text color and button background compatible with each other. Some UI themes provide the button control with dark text with a light background when the dialog background is dark. This means removing of the light button background will cause painting of dark button text over dark dialog background. It was not a problem to remove the button background in the CExtIconButton control because it does not display text. The control you need is very close to the CExtHyperLinkButton button. You can use two buttons: one is hyperlink button and second is drop down or ellipsis button near the hyperlink.