RE: Masked Windows
From: Kevin Cochran (KevinCochran_at_discussions.microsoft.com)
Date: 08/08/04
- Next message: Chad Dylan Long: "Help with global hooks, multiple procs"
- Previous message: Ellers: "Re: new with GUI under VC++ 6.0"
- In reply to: Steve S: "RE: Masked Windows"
- Next in thread: Carsten Neubauer: "RE: Masked Windows"
- Reply: Carsten Neubauer: "RE: Masked Windows"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 7 Aug 2004 17:01:02 -0700
I think I'm using the wrong terminology. What I want is a window that is text
only with a completely transparent background (no title bar or anything, just
my text). And for a bonus look, I'd like for a semi-transparent window to
popup behind the text when the mouse moves into the client area.
I seem to be able to do one without the other, but not together. :(
Please help,
Kevin
"Steve S" wrote:
> Kevin
>
> What do you mean by 'masked off' ?
> You don't want the normal background fill around the text?
> If so, just use
> UINT oMode = SetBkMode(hDC, TRANSPARENT);
>
> // do your drawing
>
> SetBkMode(hDC, oMode);
>
> On the other hand, if you really mean mask in the painting sense, then it
> sounds like you do need to use a memory DC and a bitmap, followed by your
> DrawText and some BitBlt command with a particular ROP code.
>
> There used to be an article on MSDN which talked about producing a
> transparent bitmap given a particular background colour (KB was Q79212,
> search for "How To Drawing Transparent Bitmaps" and see if that helps.
>
> Steve S
>
> "Kevin Cochran" wrote:
>
> > Greetings,
> >
> > I would like to have a window where I can do a DrawText (or equivalent) and
> > have everything else masked off, so that only the text I type shows up. I
> > figure this should be possible by creating a compatible DC and a bitmap in
> > memory, right? But how do I apply the mask? I have never done window masks
> > before and I can't find much on google.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> > Kevin
> >
- Next message: Chad Dylan Long: "Help with global hooks, multiple procs"
- Previous message: Ellers: "Re: new with GUI under VC++ 6.0"
- In reply to: Steve S: "RE: Masked Windows"
- Next in thread: Carsten Neubauer: "RE: Masked Windows"
- Reply: Carsten Neubauer: "RE: Masked Windows"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|