Transparency of controls
-
Hi everybody, can anybody please direct me to a web site or an article (I could not find anything helpful) about how to make controls to be transparent. I use Visual Studio 2005 to make a Visual C++ dialog based application, and I use ATL only. Even though I specify a static control should be transparent, it is not. The background is static, it does not change, but neither static controls nor the captions of group box controls are rendered transparently. Thanks for your help.
-
Hi everybody, can anybody please direct me to a web site or an article (I could not find anything helpful) about how to make controls to be transparent. I use Visual Studio 2005 to make a Visual C++ dialog based application, and I use ATL only. Even though I specify a static control should be transparent, it is not. The background is static, it does not change, but neither static controls nor the captions of group box controls are rendered transparently. Thanks for your help.
Okay, I found it: I need to handle the message OnCtlColorStatic: ::SetBkMode((HDC)wParam, TRANSPARENT); return (LRESULT) GetStockObject (HOLLOW_BRUSH); and my static controls are all transparent. But I can still not make group box captions to be trtansparent. Thanks.
-
Okay, I found it: I need to handle the message OnCtlColorStatic: ::SetBkMode((HDC)wParam, TRANSPARENT); return (LRESULT) GetStockObject (HOLLOW_BRUSH); and my static controls are all transparent. But I can still not make group box captions to be trtansparent. Thanks.
damir_tk wrote:
But I can still not make group box captions to be trtansparent.
Good luck with a trackbar control as well :)
-
damir_tk wrote:
But I can still not make group box captions to be trtansparent.
Good luck with a trackbar control as well :)
-
Haha...no, I am not going to deal with that one. Anyways, if you know how to make the group box caption transparent, I would really appreciate it. Thanks.
damir_tk wrote:
Haha...no, I am not going to deal with that one
:) Same problem with a groupbox. You can make it owner drawn and draw it yourself (it's a button). If only WM_EX_TRANSPARENT style was implemented for all controls...