Link to home
Start Free TrialLog in
Avatar of questioner
questioner

asked on

Transparent background with Visible Text

I have a frameless popup dialog box with a single static text control that follows the cursor and displays information on what the cursor is over. That part is all working quite satisfactorily.
The problem now is that the boss has decided that he doesn't like the small "box" that is around the text. e would like both the dialog box and the background of the text control to be transparent while the text is is still completely visible.
Any suggestions on how this can be done?
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

I don't understand why " there is a small "box" that is around the text"..
But if you want to make your static text control transparent in dialogbox, you just need to right-click your static text control in your resource editor, then select the "Propertys" from the poped-up menu, then select the "Extended Styles" tab, and check the "Transparent" check-box. That's all.
You also can change the style with SetWindowLong API to add the WS_EX_TRANSPARENT.
Avatar of AndyAinscow
Did you create your 'pop-up' window with a WS_BORDER style.  (Check what styles you did use for your static control)
Avatar of questioner
questioner

ASKER

BeyondWu:
The box I was referring to is the background of the text. What the boss is wanting is to be able to see the text clearly but be able to see through the hole in the letter 'O' for example.
I have tried the Transparent check box option and have found little success with it. In test dialogs I get no change and in my real dialog it makes my idalog transparent alright but along with the text, it isa only visible when it flashes up as it moves.

AndyAinscow:
the pop-up window does not have a WS_BORDER. It only has WS_POPUP and WS_VISIBLE. There are no styles used for the static control.
ASKER CERTIFIED SOLUTION
Avatar of BeyondWu
BeyondWu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial