home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1379 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.4 KB  |  48 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!ods!scott
  3. From: scott@ods.com (Scott Harper)
  4. Subject: Re: Change App's Icon On The Fly
  5. Message-ID: <1992Aug18.141851.25525@ods.com>
  6. Cc: heathh@cco.caltech.edu
  7. Organization: Optical Data Systems, Inc.
  8. X-Newsreader: Tin 1.1 PL5
  9. References: <1992Aug17.235109.17512@cco.caltech.edu>
  10. Date: Tue, 18 Aug 1992 14:18:51 GMT
  11. Lines: 35
  12.  
  13. Heath Ian Hunnicutt (heathh@cco.caltech.edu) wrote:
  14. : scott@ods.com (Scott Harper) writes:
  15. : >[Wants to change his icon immediately]
  16. : >   SetClassWord(hWnd, GCW_HICON, hNewIcon);    then,
  17. : >   if (IsIconic(hWnd))
  18. : >      InvalidateRect(hWnd, NULL, TRUE);
  19. : >and it worked like I wanted it to.  However, since I've switched
  20. : >over to the 3.1 SDK, it no longer works.  Any suggestions?
  21. :
  22. :     I have done this very same thing in 3.1, followed by an
  23. : UpdateWindow(hWnd); call.  This works for me.
  24.  
  25.  
  26. I tried this, but it didn't work for me...
  27.  
  28. I even tried this:
  29.  
  30.    if (IsIconic(hWnd))
  31.       {
  32.       GetWindowRect(hWnd, (LPRECT) &rect);
  33.       InvalidateRect(GetDesktopWindow(), (LPRECT) &rect, TRUE);
  34.       UpdateWindow(GetDesktopWindow());
  35.       }
  36.  
  37. but it didn't work either.  So if there are yet other suggestions,
  38. I'd love to hear them!!
  39.  
  40. Thanks -
  41. -- 
  42. Scott Harper                       Optical Data Systems, Inc.
  43. scott@ods.com                      1101 E. Arapaho Road
  44. (214) 234-6400                     Richardson, TX  75081
  45.