Article View: comp.os.ms-windows.programmer.misc
Article #1947all about icons
From: chris snell
Date: Sun, 03 Jan 1993 15:39
Date: Sun, 03 Jan 1993 15:39
39 lines
2338 bytes
2338 bytes
Hello, world.
I'm having a number of problems with icons, but I'll just ask you two
questions (for now):
1/ How do I create a monochrome cursor from an Icon?
I have an MDI window in which every child window will draw its own
icon, picked from a common pool of hIcons. Each window is of a common
class, and the class icon is set to null, so each child window receives
wm_Paint messages, and draws the appropriate icon. So far, so good. The
problem arises when an iconized child is moved, the default drag cursor
is used instead of a cursor shaped like the appropriate icon. I must
respond to the wm_QueryDragIcon message, but to do so I must create a
monochrome cursor shaped like the appropriate icon. How?
2/ How can I get the Width, Height, Planes, BitsPixel, ANDBits and XORbits
of an icon given its handle?
This would also help me with problem number 1, but I need it for a
different purpose. I have an application that displays millions upon
billions of icons (well, ok, maybe a couple hundred). Seldom are more
than 20 displayed at a time. I would like to free the resource space of
icons not being displayed by creating an icon pool in global memory,
copying the icon Width, Height, Planes, etc. information to the memory
pool, then destroying the icon handle. If it becomes neccessary to
display the icon, I could then use the CreateIcon API function to
recreate the icon. But for this to work I need to get the Width,
Height, Planes etc information from the original hIcon. Again, how?
3/ Is there a good 'All about Icons & Bitmaps' book anyone can recommend?
Ok, ok, ok, so I can't count.
Thanks to all who respond,
chris.snell@canrem.com
---
WMR #1 Of the things I've lost, I miss my mind most
--
Canada Remote Systems - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Technical Details
Message-ID:
<1993Jan3.3151.3081@dosgate>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com]Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com] From: "chris snell" <chris.snell@canrem.com> Subject: all about icons Message-ID: <1993Jan3.3151.3081@dosgate> Reply-To: "chris snell" <chris.snell@canrem.com> Organization: Canada Remote Systems Distribution: comp Date: 3 Jan 93 10:39:01 EST Lines: 39