Article View: comp.os.ms-windows.programmer.misc
Article #2557Re: Forced Update (WM_PAINT) of Window
From: Chris Marriott
Date: Wed, 06 Jan 1993 20:32
Date: Wed, 06 Jan 1993 20:32
34 lines
1896 bytes
1896 bytes
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 |
--------------------------------------------------------------------------
Technical Details
Message-ID:
<726352337snz@chrism.demon.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!demon!chrism.demon.co.uk!chrisReferences:
<C0Fx4F.6Cs@ccu.umanitoba.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc From: chris@chrism.demon.co.uk (Chris Marriott) Path: arc1-ca.pugleaf.net!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