The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Faiseur on May 02, 2005, 10:42:43 AM

Title: Always visible window
Post by: Faiseur on May 02, 2005, 10:42:43 AM
Hi all,

I need, for a program, to show an window alarm for the user. The problem is that this window is not necessarily visible if others are open.  I tested by simulating the Windows+M key, which makes it possible to minimize the opened windows, then to show my window, but that does not satisfy me for various reason. How can I proceed in the best way ? 

Thank you for your help,

Marc

Title: Re: Always visible window
Post by: thomasantony on May 02, 2005, 11:13:02 AM
Hi,
  Use SetWindowPos with HWND_TOPMOST along with the co-ordinates. Dunno if it works with Windows+M

Thomas :U
Title: Re: Always visible window
Post by: Faiseur on May 02, 2005, 12:41:43 PM
Thank you  thomasantony !  That functions very well.

That can be useful to other people. For my tool is:

  LOCAL rect:RECT

  ...

  .If eax==WM_INITDIALOG
    ...
    invoke   GetWindowRect, hWin, ADDR rect
    invoke   SetWindowPos, hWin, HWND_TOPMOST,rect.left, rect.top,0,0, SWP_NOSIZE


Title: Re: Always visible window
Post by: Mark Jones on May 02, 2005, 02:28:46 PM
Good to know, thanks Marc. :)