Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Svae to a .ico file with a HICON

3 views
Skip to first unread message

Jacky

unread,
Sep 28, 2001, 12:43:45 AM9/28/01
to
HI,
I can get a HCION and I need save it to a .ico file.
help me !!!


Jacky


Christian ASTOR

unread,
Sep 28, 2001, 3:26:56 AM9/28/01
to
Jacky wrote:

> I can get a HCION and I need save it to a .ico file.
> help me !!!
>

One way =>

OleCreatePictureIndirect() with PICTDESC.icon.hicon = hIcon =>
IPicture
StgCreateDocfile()
CreateStream()
IPicture->SaveAsFile
// ... don't forget all Release()...

Then you read the temporary Stream =>
StgOpenStorage()
Stat() for .ICO size.
OpenStream()
GlobalAlloc()
GlobalLock()
Read()
CreateFile()-WriteFile()-CloseHandle()
GlobalUnlock()
GloBalFree()

Jacky

unread,
Sep 29, 2001, 2:34:47 AM9/29/01
to
Christian ASTOR,
your method is very good, Thank you very much.

Jacky

"Christian ASTOR" <cast...@club-internet.fr> wrote in message
news:3BB4263F...@club-internet.fr...

0 new messages