Version 6 of always on top

Updated 2002-02-22 10:06:13

[the question of how an application can force some part of itself as the top level window is a FAQ]

Could someone please write something here about the topic?

ptk*

Win32

The API function needed is:

  SetWindowPos(HWND hWnd,       // handle to window
               HWND hWndAfter,  // placement order handle
               int x, int y,    // position (horizontal, vertical)
               int cx, int cy,  // size (width, height) 
               UINT uFlags)     // positioning flags

The placement order handle can be either another HWND or once of the following constants:

    ''HWND_BOTTOM'' 1    Moves to the bottom
    ''HWND_NOTOPMOST''    -2 Place above all non-topmost windows.
    ''HWND_TOP''    0 Move to the top
    ''HWND_TOPMOST''    -1 Move to the top and keep it there.