[comp.windows.ms] Refresh problem for child window titlebar

il@csri.toronto.edu (Indra Laksono) (06/01/89)

I am writing a Presentation Manager program that is basically
a client window controlling a child window.  Since the child
window is on top of the client window, when processing
WM_PAINT in the client window, I do WinInvalidateRect(childwindow,..
as well as childwindowframe just before returning.
The result is that the title bar is missing in the child window.

Has anyone seen this problem?  A fix somewhere?

il@theory.toronto.edu

lau@kings.wharton.upenn.edu (Yan K. Lau) (06/01/89)

In article <8906011349.AA04577@king.csri.toronto.edu> il@csri.toronto.edu (Indra Laksono) writes:
>
>I am writing a Presentation Manager program that is basically
>a client window controlling a child window.  Since the child
>window is on top of the client window, when processing
>WM_PAINT in the client window, I do WinInvalidateRect(childwindow,..
>as well as childwindowframe just before returning.
>The result is that the title bar is missing in the child window.
>
>Has anyone seen this problem?  A fix somewhere?
>
>il@theory.toronto.edu

I have noticed a similar problem under MS Windows.  In my case,
I had two child windows overlapping.  Painting the child window
underneath messed up the scroll bars on the child window sitting
on top.  Even a refresh on top window didn't fix the problem,
the up/down arrows and box were visible but the scroll bar outline
was gone.  I didn't have a title bar so I don't know if that would
have been messed up.  The only way I could fix the problem was to
specify clip siblings when creating the windows.  That meant that
I had to create the top (smaller) window first before creating the
window underneath.  This is a major problem because windows can't
be created "on the fly".  I don't know if a similar "solution" 
would work with the PM.

Yan. 
==============================================================================
      Yan K. Lau                    + the last message of a newgroup will be:
   )~                               +   a) longer than one screen &
 ~/~  lau@scrolls.wharton.upenn.edu +   b) something you're not interested in.
 /\_                                + your decision, 'n' key or space bar?
==============================================================================

bturner@hpcvlx.HP.COM (Bill Turner) (06/03/89)

>I am writing a Presentation Manager program that is basically
>a client window controlling a child window.  Since the child
>window is on top of the client window, when processing
>WM_PAINT in the client window, I do WinInvalidateRect(childwindow,..
>as well as childwindowframe just before returning.
>The result is that the title bar is missing in the child window.
>
>Has anyone seen this problem?  A fix somewhere?

The probable cause is that the parent needs to be created with clipchildren.
(At least, this is a problem that I have seen in MSWindows).  The problem is that
the child's frame is being drawn first, then the parent's client area erases and
does its repaint (erasing the frame), then the child's client area paints.

--Bill Turner (bturner@hp-pcd.hp.com)
HP Corvallis Information Systems