TSalm wrote:
>>> Is there a way to use this function with a FLTK widget :
>>>    =20
>>> http://msdn.microsoft.com/en-us/library/ms648064(VS.85,printer).aspx

...

> In fact, it's because I must display an Icon getting from the function :
> GetClassLong( hWnd , GCL_HICONSM );
> ( http://msdn.microsoft.com/en-us/library/ms633580(VS.85,printer).aspx )
> 
> This function return an handle to a win2 icon...

If this is really what you want/need to do, then you should have a look at this 
link in the Operating System Issues chapter of the FLTK docs:

http://www.fltk.org/doc-1.1/osissues.html#WIN32.gdi

According to the info you provided (well, that wasn't very much), I assume that 
you want to call the function in a draw() method of some widget. If that's 
true, 
then I guess that

   DrawIcon(fl_gc, X, Y, hIcon );

should do the trick. Please note that you can only use fl_gc within a draw 
method (recommended) or after calling Fl_Window::make_current().

If I would have to handle this, I'd probably convert the icon to a bitmap, load 
the bitmap data into an Fl_[RGB_]Image, and then use this image for drawing. 
This way the platform dependent code would only be to retrieve and convert the 
icon, but YMMV.

HTH

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to