Re: saving ICOs



Am Son, 2003-06-29 um 17.21 schrieb Owen Taylor:
> On Sun, 2003-06-29 at 10:41, Matthias Clasen wrote:
> > So, in order to make gdk_cursor_new_from_pixbuf() implementable on
> > Win32, I'm currently writing code to save ICOs. 
> 
> I don't believe this is the right approach on Windows. I did some
> looking at this the other day and what you want to do is use
> CreateIconIndirect(). The usage is far from obvious, but there
> are some detailed instructions at:
> 
>  http://www.dotnet247.com/247reference/msgs/13/66301.aspx
>  
> for the WinXP case of alpha pixmaps. The same general approach is
> probably right for older versions that only support colored icons,
> though I'm sure the checks to figure out what to use where will
> be messy.

Thanks for the pointer. So it is possible to create RGBA cursors on
Windows without loading them from a file, nice. But is the same true for
animated cursors ? I've only found LoadCursorFromFile for that so we
will still need to be able to save .ANI files (and thus ICO embedded in
them) for animated cursors. 

> I guess my opinion would be to avoid such hacks unless we absolutely 
> positively need them. If we do want to support multiple-size saving,
> I suspect that adding a specific API for it would be better.

Yes, it occurred to me that it would fit nicely with the image
collection stuff that is somewhere in bugzilla.

Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]