home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- From: chris@chrism.demon.co.uk (Chris Marriott)
- Path: sparky!uunet!pipex!demon!chrism.demon.co.uk!chris
- Subject: Re: Forced Update (WM_PAINT) of Window
- Distribution: world
- References: <C0Fx4F.6Cs@ccu.umanitoba.ca>
- Organization: None
- Reply-To: chris@chrism.demon.co.uk
- X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
- Lines: 34
- Date: Wed, 6 Jan 1993 20:32:17 +0000
- Message-ID: <726352337snz@chrism.demon.co.uk>
- Sender: usenet@demon.co.uk
-
- In article <C0Fx4F.6Cs@ccu.umanitoba.ca> umwaletz@ccu.umanitoba.ca writes:
-
- >I'm using Borland C++ 3.1 to create my app and here's the problem:
- >
- >I have this main window which contains about 20 children, with each
- >child being a box containing a particular color. Up pops a dialog
- >asking the user to respond to some questions and once this dialog
- >disappears, I would like to update all of the children with their
- >new colors (ie. force a WM_PAINT message).
- >
- >I thought all I had to do was Invalidate the parent window and call
- >UpdateWindow, but this doesn't seem to work. I then tried Invalidating
- >all of the children and calling UpdateWindow, but this didn't work
- >either. Any ideas?
- >
- >James.
- >umwaletz@ccu.umanitoba.ca
- >
- >
-
- That *is* all you have to do! Saying:
-
- InvalidateRect( hWnd, NULL, TRUE );
- UpdateWindow( hWnd );
-
- forces a total repaint of window "hWnd". This certainly *should* work.
- --
- --------------------------------------------------------------------------
- | Chris Marriott | chris@chrism.demon.co.uk |
- | Warrington, UK | BIX: cmarriott |
- | (Still awaiting inspiration | CIX: cmarriott |
- | for a witty .sig .... ) | CompuServe: 100113,1140 |
- --------------------------------------------------------------------------
-
-