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

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!sdd.hp.com!elroy.jpl.nasa.gov!nntp-server.caltech.edu!heathh
  3. From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
  4. Subject: Re: Change App's Icon On The Fly
  5. Message-ID: <1992Aug17.235109.17512@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: bartman
  8. Organization: California Institute of Technology, Pasadena
  9. References: <1992Aug17.210533.4439@ods.com>
  10. Date: Mon, 17 Aug 1992 23:51:09 GMT
  11. Lines: 20
  12.  
  13. scott@ods.com (Scott Harper) writes:
  14. >[Wants to change his icon immediately]
  15.  
  16. >   SetClassWord(hWnd, GCW_HICON, hNewIcon);    then,
  17.  
  18. >   if (IsIconic(hWnd))
  19. >      InvalidateRect(hWnd, NULL, TRUE);
  20.  
  21. >and it worked like I wanted it to.  However, since I've switched
  22. >over to the 3.1 SDK, it no longer works.  Any suggestions?
  23.     I have done this very same thing in 3.1, followed by an
  24. UpdateWindow(hWnd); call.  This works for me.
  25.     Maybe MS thought that requiring UpdateWindow() to force an
  26. immediate redraw would optimize 3.1's performance...
  27.  
  28. See ya,
  29. Heath
  30. -- 
  31. On Saturday, April 18, 1992, this .sig became self-aware.
  32.  
  33.