Board index » delphi » Paint problem with MDI window in TPW

Paint problem with MDI window in TPW

  Hi,
I have a small problem with my MDI window.  In my paint method I draw a
status bar at the bottom of the window.  Unfortunately as soon as it is
drawn, it is automatically erased.  Can anybody tell me why windows is
doing this to me?  Can it be fixed?

  Any help is much appreciated.
Thanks
Geoff Martin
___________
Chil'Out
Geoff Martin                             gmar...@hermes.otago.ac.nz
-----------

 

Re:Paint problem with MDI window in TPW


Quote
Geoff Martin wrote:

>   Hi,
> I have a small problem with my MDI window.  In my paint method I draw a
> status bar at the bottom of the window.  Unfortunately as soon as it is
> drawn, it is automatically erased.  Can anybody tell me why windows is
> doing this to me?  Can it be fixed?

If your status bar is drawn in your main window, then the client window
will draw over your freshly painted status bar. To prevent this,
you can either make sure that the client window (a control between the
MDI main window and the document windows) always leaves space at the
bottom of the window, or make the status bar a child window and force
this to be always at the bottom of the main window.
The first option should be preferred. Something like this is done in
the toolbar demo that comes with BP 7.0

Good luck.

Remco

Other Threads