Re: Win32lib window question.

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sun, 11 Jun 2000 23:08:22 +0930, Mark Brown wrote:

>Hi everyone,
>
>I'm working on a program using win32lib that has a window that
>I want to always be at the front of all other windows. I looked in
>the Windows API help and in Win32lib docs etc but couldn't
>find a solution. Is there a windows style or something?
>
>Thanks in advance
>
>Mark
>

Here's a solution:  In David's latest Bleeding Edge release (at
http://www.lanset.com/dcuny/download/w32v50c.zip ) there is a new function
called 'createEx' that lets you create windows with extended attributes.
The attribute that you are looking for is WS_EX_TOPMOST (Hey David, could
you add more WS_EX_ constants to win32lib?)

Here is a small example:

-- WS_EX_TOPMOST Specifies that a window created with this style should be
-- placed above all non-topmost windows and should stay above them, even
-- when the window is deactivated. To add or remove this style, use the
-- 'SetWindowPos' function. (discussed earlier by PatRat)
include Win32Lib.ew

constant
  WS_EX_TOPMOST = 8,
  Win = createEx( Window, "Topmost", 0, Default, Default,
                           200, 300, 0, WS_EX_TOPMOST )

WinMain( Win, Normal )

-- Brian

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu