[DUG] SetWindowPos HWND_TOPMOST
Ross Levis
ross at stationplaylist.com
Fri Aug 20 22:03:42 NZST 2010
I have a window in my app which needs to be set to stay on top of all
others. In D7, if a modal dialog is activated from this window such as a
TOpenFile, it appears underneath the window. I believe later versions of
Delphi resolve this problem.
I got around the issue by using SetWindowPos with HWND_NOTOPMOST just before
the dialog is activated, and set it back again afterwards.
This works well generally, but a few users have complained of the entire app
hanging either before the dialog appears or after it closes. I've noticed
this maybe twice over the last few years using XP.
Is this an XP bug or Delphi getting confused?
Perhaps I should try a Application.ProcessMessages after the SetWindowsPos.
Ross.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100820/1607b588/attachment-0001.html
More information about the Delphi
mailing list