This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Custom icons per window class/name patch


Howdy Ralf...

At 01:15 PM 5/21/2003 +0200, you wrote:
...Now I'm able to retrieve the pixmap pointer from the WM_HINTS structure and the
bitmap data, the CreateIcon returns an icon handle, but unfortunally the icon
isn't displayed.
Any hints ?

I see your code, there are a few problems with it as far as what Windoze wants in a bitmap (i.e. word alignment for starters, X bitmaps are byte packed). But it's definitely right on track! You may want to test ALT-TAB, if you have a 32x32 icon from X it WILL show it in the task switcher from what I've seen...

Using your sample and just making fixed-size icons I found that only if you
make an icon of the win16x16 (the mini icon in window titles) will it
show that icon, OTW it shows a big, black box.

As a real kludge (it may be the only way, actually!) you might take the
X bitmap and make 2 icons and pack them into a memory-only resource
type of RT_GROUP_ICON, one SM_CXSMICON x SM_CYSMICON and one
SM_CXICON x SM_CYICON.  You could also write your own .ICO temp file
and use the Windoze LoadImage call, but that's a pain converting
cygwin paths to Windoze paths...

I have a feeling this is one of the undocumented Windoze corners you
fear getting painted in to...

I'll look at this some more this weekend if it's not too nice...


-Earle F. Philhower, III earle@ziplabel.com cdrlabel - ZipLabel - FlpLabel http://www.cdrlabel.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]