| |

VerySource

 Forgot password?
 Register
Search
View: 753|Reply: 5

VC6.0 using GDI + to draw icons, opaque?

[Copy link]

3

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-4 02:20:01
| Show all posts |Read mode
I got a HICON handle. I tried to use the Bitmap class constructor (HICON hIcon) to create a Bitmap object, and then used Graphics' DrawImage to draw the picture, but the icon became opaque (annoying!). Is there any way to do it in Graphics A transparent icon is drawn on the top. Thank you heroes, I ca n’t find a way.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-5-9 20:30:01
| Show all posts
Draw to memory DC and then AlphaBlend to device DC
Reply

Use magic Report

3

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-17 22:15:01
| Show all posts
This is how it is done now, but it won’t work on systems without GDIPLUS after release. Put GDIPLUS.DLL in the program directory, neither system nor system32? How to solve
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-7-19 00:15:01
| Show all posts
Use CImageList to transparent HICON
Reply

Use magic Report

3

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-7-19 22:45:01
| Show all posts
But I still have to use DC to draw, no effect
Reply

Use magic Report

3

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-7-19 23:00:01
| Show all posts
I want to draw on Graphics
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list