Re: problems with window_set_icon()



Orgren, Joseph H writes:
I'm trying to change the icon that appears in the top bar (window 
decoration) of my Gtk app on a Win98 machine.  I've tried changing both 
the default icons and the icon for the wondow, but I always get the GTK 
cube.

FYI, Hans Breuer recently implemented gdk_window_set_icon(), it now
works quite nicely. GIMP 1.3.17's image windows have the images as
icons, for instance. Wait for GTK+ 2.2.3.

(A sidenote about the strangeness of the Windows API: Usually the WM_*
messages you receive in a thread's message loop are quite like X
events, i.e. Windows tells you this and that about what is happening
or asks you stuff, and you then respond by calling various API
functions that tell Windows to do stuff. Usually the WM_* message
names are quite self-documenting, like WM_MOVE, WM_LBUTTONDOWN,
WM_GETMIXMAXINFO, etc.

But then there is the WM_SETICON message. Hmm, that sounds like
Windows is asking you to set a window's icon, yes? Nope. It's *you*
who should send the WM_SETICON message to a window *of your own* to
set its icon. (But you shouldn't handle that message yourself, but
pass it on to the DefWindowProc.) Weird, isn't it?)

--tml





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