home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4697 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.8 KB  |  49 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. From: chris@chrism.demon.co.uk (Chris Marriott)
  3. Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
  4. Subject: Re: Forced Update (WM_PAINT) of Window 
  5. Distribution: world
  6. References: <C0Fx4F.6Cs@ccu.umanitoba.ca>
  7. Organization: None
  8. Reply-To: chris@chrism.demon.co.uk
  9. X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
  10. Lines: 34
  11. Date: Wed, 6 Jan 1993 20:32:17 +0000
  12. Message-ID: <726352337snz@chrism.demon.co.uk>
  13. Sender: usenet@demon.co.uk
  14.  
  15. In article <C0Fx4F.6Cs@ccu.umanitoba.ca> umwaletz@ccu.umanitoba.ca writes:
  16.  
  17. >I'm using Borland C++ 3.1 to create my app and here's the problem:
  18. >
  19. >I have this main window which contains about 20 children, with each
  20. >child being a box containing a particular color. Up pops a dialog
  21. >asking the user to respond to some questions and once this dialog
  22. >disappears, I would like to update all of the children with their
  23. >new colors (ie. force a WM_PAINT message).
  24. >
  25. >I thought all I had to do was Invalidate the parent window and call
  26. >UpdateWindow, but this doesn't seem to work. I then tried Invalidating
  27. >all of the children and calling UpdateWindow, but this didn't work
  28. >either. Any ideas?
  29. >
  30. >James.
  31. >umwaletz@ccu.umanitoba.ca
  32. >
  33. >
  34.  
  35. That *is* all you have to do!  Saying:
  36.  
  37.     InvalidateRect( hWnd, NULL, TRUE );
  38.     UpdateWindow( hWnd );
  39.  
  40. forces a total repaint of window "hWnd".  This certainly *should* work.
  41. -- 
  42. --------------------------------------------------------------------------
  43. | Chris Marriott                           | chris@chrism.demon.co.uk    |
  44. | Warrington, UK                           | BIX: cmarriott              |
  45. | (Still awaiting inspiration              | CIX: cmarriott              |
  46. |  for a witty .sig .... )                 | CompuServe: 100113,1140     |
  47. --------------------------------------------------------------------------
  48.  
  49.