Hello all

I'd like to create a small antialiased graphic in my today item, something
that shows a value like an analogue gauge. Therefor I created a bitmap of
doubled dimensions on which I intend to paint my graphic and which then is
downsized to get the smooth edges. But the question for me now is:

how do I draw on a bitmap, i.e. get a DC to it?

Are there any other effective methods of combining graphics that aren't
fully opaque (e.g. painting my gauge's background on top of the today
background, for instance like milky glass put on it)?
--
Gruß | Greetings | Qapla' - http://www.stud.tu-ilmenau.de/~frst-ii/

Re: Using DC functions on bitmap by r_z_aret

r_z_aret
Tue Oct 11 16:10:42 CDT 2005

On Sat, 8 Oct 2005 20:58:33 +0200, Frank Steinmetzger
<this-address@doesnt.exist> wrote:

>Hello all
>
>I'd like to create a small antialiased graphic in my today item, something
>that shows a value like an analogue gauge. Therefor I created a bitmap of
>doubled dimensions on which I intend to paint my graphic and which then is
>downsized to get the smooth edges. But the question for me now is:
>
>how do I draw on a bitmap, i.e. get a DC to it?

You have do be indirect. Use GetDC (perhaps with NULL as its argument)
to create a DC. Then use CreateCompatibleDC to create a memory DC.
Then use SelectBitmap (a macro) to select the bitmap into the memory
DC. And then draw on the memory DC. I've got code that works well
enough, but can't easily share or describe it.


>
>Are there any other effective methods of combining graphics that aren't
>fully opaque (e.g. painting my gauge's background on top of the today
>background, for instance like milky glass put on it)?

BitBlt and StrecthBitBlt have arguments that seem to provide functions
like this. I've not found time and energy to try them.

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com

Re: Using DC functions on bitmap by Frank

Frank
Tue Oct 11 16:43:21 CDT 2005

Tue, 11 Oct 2005 17:10:42 -0400, r_z_aret@pen_fact.com schrob:

> On Sat, 8 Oct 2005 20:58:33 +0200, Frank Steinmetzger
> <this-address@doesnt.exist> wrote:
>
>>Hello all
>>
>>I'd like to create a small antialiased graphic in my today item, something
>>that shows a value like an analogue gauge. Therefor I created a bitmap of
>>doubled dimensions on which I intend to paint my graphic and which then is
>>downsized to get the smooth edges. But the question for me now is:
>>
>>how do I draw on a bitmap, i.e. get a DC to it?
>
> You have do be indirect. [...]
>
>>Are there any other effective methods of combining graphics that aren't
>>fully opaque (e.g. painting my gauge's background on top of the today
>>background, for instance like milky glass put on it)?
>
> BitBlt and StrecthBitBlt have arguments that seem to provide functions
> like this. I've not found time and energy to try them.

Still, thanks. This already helped considerably.
--
Gruß | Greetings | Qapla' - http://www.stud.tu-ilmenau.de/~frst-ii/
Erst lesen, dann schreiben: http://www.standart.de.gg/
OjE-Nutzer, bitte achtet auf Eure Leser:
http://piology.org/news/oe-erste-schritte.html