0

How can I call lockWindowUpdate using Delphi Prism?

Arioch 'The
  • 15,799
  • 35
  • 62
Bill Seven
  • 768
  • 9
  • 27

2 Answers2

4

Before worrying too much about how to call it, I would think very carefully first about whether you really should or even need to call it. Raymond Chen has some very useful discussion points about LockWindowUpdate() and it's pitfalls that you may wish to consider.

Edit:

It is almost never the intention of anyone to call LockWindowUpdate

LockWindowUpdate(hwnd);
...
LockWindowUpdate(0);

Instead you probably meant to use SetWindowRedraw:

SetWindowRedraw(hwnd, false);
...
SetWindowRedraw(hwnd, true);
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Deltics
  • 22,162
  • 2
  • 42
  • 70
0

Something like:

[DllImport('user32.dll')]
class method LockWindowUpdate(handle: IntPtr): Boolean;

in a class

Carlo Kok
  • 1,128
  • 5
  • 14