PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

HICO to HBITMAP

Hello, I'm having some troubles trying to convert an HICO to HBITMAP.
I'm not very experienced with these things, and I tried something like this (taking a wild guess) where myHicon is my HICON:

HDC icoDest, bmpDest;
HBITMAP hBitmap;
DrawIcon (icoDest, 0, 0, myHicon);
CreateCompatibleBitmap (bmpDest, 16, 16);
BitBlt (bmpDest, 0, 0, 16, 16, icoDest,0, 0, SRCCOPY);
(HBITMAP)SelectObject(bmpDest,hBitmap);

It doesn't work but I guess I'm messing up with things I don't know very well. I know under WIN32 there's GetIconInfo which doesn't seem to be present under wince. Can anybody help? Thanks in advance.
Try DrawIconEx instead of DrawIcon.

Dan East