Thanks but I don't think I know how to use it in order to create the icon. An icon file's layout is quite complicated, as explained in this article:
http://www.codeproject.com/dotnet/MultiIcon.asp . I think that if you need to convert a bitmap to an icon you'll first have to get a lot of information from that bitmap and that's the hard part.
But maybe there's something I don't know about.