Is there a way to convert HICON to HBITMAP?
thank you.
Is there a way to convert HICON to HBITMAP?
thank you.
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
Off the top of my head, use DrawIcon to draw it to a DC with a bitmap selected into it and there you go.
Yes. Use GetIconInfo or draw the icon to a bitmap using DrawIconEx. See threads.
wow, it's so short and simple... and not DCs. Thank you.
Code:HBITMAP hBitmap; HICON hIcon; ICONINFO iconinfo; hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_ICON)); GetIconInfo(hIcon, &iconinfo); hBitmap = iconinfo.hbmColor;
"I don't suffer from insanity but enjoy every minute of it" - Edgar Allen Poe
http://www.Bloodware.net - Developing free software for the community.
This's what i'm finding. Thank so much if it work.
No, it's wrong.
You must pass throug a DIB Section or a comp. DC.
See MSDN (WSDK) or Google Groups for the usual methods (comp.os.ms-windows.programmer.win32
and others)