home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4558 < prev    next >
Encoding:
Text File  |  1993-01-03  |  2.2 KB  |  51 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!uunet.ca!canrem!dosgate!dosgate![chris.snell@canrem.com]
  3. From: "chris snell" <chris.snell@canrem.com>
  4. Subject: all about icons
  5. Message-ID: <1993Jan3.3151.3081@dosgate>
  6. Reply-To: "chris snell" <chris.snell@canrem.com>
  7. Organization: Canada Remote Systems
  8. Distribution: comp
  9. Date: 3 Jan 93 10:39:01 EST
  10. Lines: 39
  11.  
  12. Hello, world.
  13.  
  14. I'm having a number of problems with icons, but I'll just ask you two 
  15. questions (for now):
  16.  
  17. 1/ How do I create a monochrome cursor from an Icon? 
  18.    I have an MDI window in which every child window will draw its own
  19.    icon, picked from a common pool of hIcons. Each window is of a common
  20.    class, and the class icon is set to null, so each child window receives
  21.    wm_Paint messages, and draws the appropriate icon. So far, so good. The
  22.    problem arises when an iconized child is moved, the default drag cursor
  23.    is used instead of a cursor shaped like the appropriate icon. I must
  24.    respond to the wm_QueryDragIcon message, but to do so I must create a
  25.    monochrome cursor shaped like the appropriate icon. How?
  26.  
  27. 2/ How can I get the Width, Height, Planes, BitsPixel, ANDBits and XORbits 
  28.    of an icon given its handle?
  29.    This would also help me with problem number 1, but I need it for a
  30.    different purpose. I have an application that displays millions upon
  31.    billions of icons (well, ok, maybe a couple hundred). Seldom are more
  32.    than 20 displayed at a time. I would like to free the resource space of
  33.    icons not being displayed by creating an icon pool in global memory,
  34.    copying the icon Width, Height, Planes, etc. information to the memory
  35.    pool, then destroying the icon handle. If it becomes neccessary to
  36.    display the icon, I could then use the CreateIcon API function to
  37.    recreate the icon. But for this to work I need to get the Width,
  38.    Height, Planes etc information from the original hIcon. Again, how?
  39.  
  40. 3/ Is there a good 'All about Icons & Bitmaps' book anyone can recommend?
  41.  
  42. Ok, ok, ok, so I can't count.
  43. Thanks to all who respond,
  44.                                         chris.snell@canrem.com
  45.  
  46. ---
  47. WMR #1 Of the things I've lost, I miss my mind most
  48. --
  49. Canada Remote Systems  - Toronto, Ontario
  50. World's Largest PCBOARD System - 416-629-7000/629-7044
  51.