I am using NT Server 4, with SP4 at the moment.

Looking at the documentation for that function it is not suppose to do that.
It stops the particular control from re-drawing until the
LockWindowUpdate(0).

ps: Something you can do about the status bar could be to create your own
status bar and trap the WM_ERASEBKGND message.

Below is some code to do that. I have not tried this, so let me know if it
does something.


unit AdrockFlickerFreeStatusBar;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ComCtrls;

type
  TAdrockFlickerFreeStatusBar = class(TStatusBar)
  private
    { Private declarations }
  protected
    { Protected declarations }
  public
    { Public declarations }
    procedure WM_ERASEBKGND(Var Message : TMessage); message WM_ERASEBKGND;
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure TAdrockFlickerFreeStatusBar.WM_ERASEBKGND(Var Message : TMessage);
begin
  Message.Result := 1;
end;

procedure Register;
begin
  RegisterComponents('Adrock', [TAdrockFlickerFreeStatusBar]);
end;

end.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Tom Munro Glass
Sent: Thursday, July 01, 1999 9:21 PM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Flicker - with LockWindowUpdate(EditControl.handle);


Chris

Since I'm having problems with a flickering statusbar, I tried using
LockWindowUpdate and got exactly the same results as you! When I call
LockWindowUpdate(0) the entire screen repaints, in fact the only thing that
doesn't flicker is my statusbar!

Surely this has to be a Windows bug - I'm using NT Workstation 4.0 SP5 -
what OS are you using?

==================================================================

Tom Munro Glass

+----------------------------------------------------------------+
| E-mail:                                                        |
|     Internet:           [EMAIL PROTECTED]                         |
| Web sites:                                                     |
|     TMG CONSULTANCY:    http://www.tmgcon.com                  |
|     Tewkesbury Web:     http://www.tmgcon.com/tewksweb         |
+----------------------------------------------------------------+

>
> I am creating a component that moves a RTF control around and
> fills it with
> data when you click the mouse. The problem I am having is
> that it flickers
> about 4 times when I move the control and give it focus.
>
> The LockWindowUpdate(EditControl.handle) fix's this but when I go
> LockWindowUpdate(0) the whole screen is drawn and causes a
> flicker over the
> whole screen and not just my control..
>
> Is there any other routines to stop control's from flickering?
>
> Why does LockWindowUpdate cause the whole screen to flicker
> when you call it
> with the 0 parameter which stops the control from being locked?
>
> Chris
>
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to