How call lockWindowUpdate using DelphiPrism
How can I call lockWindowUpdate using Delph开发者_运维技巧i Prism?
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);
Something like:
[DllImport('user32.dll')]
class method LockWindowUpdate(handle: IntPtr): Boolean;
in a class
精彩评论