pDC->SetBkMode(TRANSPARENT);
return (HBRUSH) GetStockObject(HOLLOW_BRUSH);
--Carter
"James Roy" <Jame...@worldnet.att.net> wrote in message
news:AIyv5.5965$M37.4...@bgtnsc07-news.ops.worldnet.att.net...
In article
<eVnOWyR...@cppssbbsa02.microsoft.com>,
"Carter Smith" <cart...@msn.com> wrote:
>
> This is just be a matter of adding an
OnCtlColor handler to your form view
> class, as described in knowledge base
article "Q132080 HOWTO: Change the
> Color of an MFC Child Control Class". You can
determine which control on the
> form view is causing the OnCtlColor call by
checking the nCtlColor and pWnd
> parameters (for example, check pWnd-
>GetDlgCtrlID()). When OnCtlColor is
> called for your static control, set the
background mode to transparent and
> return a stock hollow brush, something like
this:
>
> pDC->SetBkMode(TRANSPARENT);
> return (HBRUSH) GetStockObject
(HOLLOW_BRUSH);
>
> --Carter
>
> "James Roy" <Jame...@worldnet.att.net> wrote
in message
> news:AIyv5.5965$M37.410010@bgtnsc07-
news.ops.worldnet.att.net...
> > The subject asks it. Anyone have any
experience or samples setting the
> > background of a CStatic transparent so as not
to clash with DIB used as
> the
> > background in a form view?
> > Thanks
> >
> >
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
<jame...@my-deja.com> wrote in message news:8prkkb$vd4$1...@nnrp1.deja.com...
> Excellent suggestion, works great.
> One thing though, How can I accomplish the same
> thing for Other Controls like CSliderCtrl. They
> appear to misbehave badly in a similar fashion.
>
>
> In article
> <eVnOWyR...@cppssbbsa02.microsoft.com>,
> "Carter Smith" <cart...@msn.com> wrote:
> >
> > This is just be a matter of adding an
> OnCtlColor handler to your form view
> > class, as described in knowledge base
> article "Q132080 HOWTO: Change the
> > Color of an MFC Child Control Class". You can
> determine which control on the
> > form view is causing the OnCtlColor call by
> checking the nCtlColor and pWnd
> > parameters (for example, check pWnd-
> >GetDlgCtrlID()). When OnCtlColor is
> > called for your static control, set the
> background mode to transparent and
> > return a stock hollow brush, something like
> this:
> >
> > pDC->SetBkMode(TRANSPARENT);
> > return (HBRUSH) GetStockObject
> (HOLLOW_BRUSH);
> >
> > --Carter
> >
> > "James Roy" <Jame...@worldnet.att.net> wrote
> in message
> > news:AIyv5.5965$M37.410010@bgtnsc07-
> news.ops.worldnet.att.net...
> > > The subject asks it. Anyone have any
> experience or samples setting the
> > > background of a CStatic transparent so as not
> to clash with DIB used as
> > the
> > > background in a form view?
> > > Thanks
> > >
> > >
> >
> >
>
>
>