![]() GdipDrawImageRectI(g, background, e, 0, 971, 44) Lpstr = SHCreateMemStream(fByte, 200000) ĬurBack = CreateCompatibleBitmap(hdc, rect.right, 44) HPng = LoadResource(GetModuleHandle(NULL), resrc) Resrc = FindResource(GetModuleHandle(NULL), MAKEINTRESOURCE(resource), TEXT("PNG")) Void LoadPNG(GpImage **image, int resource, HMODULE hInstance) GDIPLUS_STARTUP_INPUT GdiplusStartupInput ![]() GDIPLOADIMAGEFROMSTREAM GdipLoadImageFromStream What you are probably looking for is a working GDI+ example which will use a PNG with alpha channel? This is just an excerpt and I left out the whole mess loading external functions from a DLL part, but maybe this will help you: static GpImage *background = NULL ![]() There are a couple of options where you can set ONE color as transparent then load a simple BMP/JPEG and do some BITMAP tricks however using ICO/GIF will be far easier for this. To my knowledge you will not accomplish this by simply using GDI. You are probably talking about native C/C++ development with GDI/win32? NET this is not a real problem for you, because afaik PNG support is already build in. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |