ooh.. i found the problem...it was boz of CHAIN_MSG_MAP, which has been
declared abouve the function call..
but again i failed to make slider as tranparent.. I tried Like this
when i add WM_CTLCOLORSTATIC , it seems its not calling...
I tried like this..
BEGIN_MSG_MAP(CStreamPlayer)
CHAIN_MSG_MAP(CComCompositeControl<CMYDlg>)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MESSAGE_HANDLER(WM_CTLCOLORSTATIC, OnCtlColorStatic)
END_MSG_MAP()
LRESULT OnCtlColorStatic(UINT uMsg, WPARAM wParam, LPARAM lParam,
BOOL& bHandled)
{
bHandled = TRUE;
SetBkMode((HDC) wParam, TRANSPARENT);
//SetBkColor((HDC) wParam, RGB(0,0,255));
return (LRESULT)GetStockObject(WHITE_BRUSH);
}
Whats missing in this function call.. Pls help..
Suje
Alexander Nickolov wrote:
For the static control - return GetStockObject(NULL_BRUSH)
from your WM_CTLCOLORSTATIC message handler (note you
need a resource ID for your static control in oder to identify
it, unless you want all static controls transparent).
For the trackbar (slider) control read up on NM_CUSTOMDRAW.
I expect you'll need to select a NULL brush in the HDC when
handling CDDS_ITEMPREERASE.
Don't forget to remove the WS_CLIPCHILDREN style of the
parent window (dialog)...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
<sujeeshlal@gmail.com> wrote in message
news:1169126942.156982.38870@l53g2000cwa.googlegroups.com...
Hi,
I have an ATL Dialog without supporting MFC which contains a
background
image. How can i make transparent the static and slider control in my
dialog .
I cant see WM_Controlcolor msg in my Dialog. Also when i tried to
subclass the CStatic , it shows undeclared identifier.
Somebody please help
regards
suje