[ANNOUNCEMENT] Server Test 88
Earle F. Philhower III
earle@ziplabel.com
Mon Jun 2 01:59:00 GMT 2003
Howdy Lev, thanks for the info!
At 09:42 AM 6/1/2003 -0400, you wrote:
>I think I can tell you what you need to do to allow small and large icons
>specified seperately. First, you need your window to be WNDCLASSEX not
>WNDCLASS. This gives you the hIcon element as before, which is to be of
>"system large" size, and in addition gives you an element hIconSm, which
>is of "system small" size. Now of course you need to know what system
>large, system small sizes are (the current code seems to assume system
>large is 32x32). You can get this using GetSystemMetrics with parameters
>SM_CXICON, SMCYICON for the system large and SM_CXSMICON, SMCYSMICON for
>system small. The system large size is determined by the video driver and
>cannot be changed any other way, the system small size is controlled by
>the "caption buttons" size setting in the "display properties" applet,
>appearance tab.
Yup, that's listed (GCL_HICONSM) right next to the GWL_ value we presently
use, I just never saw it!
I did a quickie experiment and added bilinear filtering on the BW icon
format only. Results: xcalc still looks like garbage even @32x32:
instead of a black mismash, it's a gray one. There is just no good way of
making some older icons look good, and newer apps use colored icons so
there isn't quite so big a subsampling problem. IMHO, while you could add
filtering and 16x16 icon creation to the present code, it wouldn't be
worth the effort. Try it for yourself, use twm and take a snapshot of the
big ol' xcalc icon, and then use your favorite image app to shrink it to
32x32 and I think you'll be disappointed no matter how you slice it.
You also pointed out a possible problem, instead of using the system
supplied X/Y of an icon we've got 32x32 hard coded. It seems that this
assumption is correct on all Windoze versions so far, but it might be a bit
more "proper" to replace the "iconSize=32;" to
"iconSize=GetSystemMetrics(SM_CXICON);". It could also be changed to have
non-square icons, in fact it was originally written to support them but
I ended up just overriding the Y scale with the X scale.
-Earle F. Philhower, III
earle@ziplabel.com
cdrlabel - ZipLabel - FlpLabel
http://www.cdrlabel.com
More information about the Cygwin-xfree
mailing list