Board index » cppbuilder » Keeping a windows over all others

Keeping a windows over all others

Hi !

Here is my question :
Is it possible under Win95 or / and NT to keep a window active,
nevermind the application ?
I mean, I want a window that always keep the focus, like modal dialogs,
but moreover I want this windows to protect the user to switch to
another application by clicking in another windows in the background.
Do you have a way for that ?

Thanks.
Julien, ja...@telebot.net

 

Re:Keeping a windows over all others


stid escreveu na mensagem <37BD4F1E....@club-internet.fr>...

Quote
>Hi !

>Here is my question :
>Is it possible under Win95 or / and NT to keep a window active,
>nevermind the application ?

    SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0,
                 SWP_NOSIZE | SWP_NOMOVE);

    SetForeGroundWindow(hWnd);

    And process the WM_ACTIVE and WM_ACTIVATEAPP
    messages to avoid your window from been deactivated,
    call SetActiveWindow.

    Regards,

    Wenderson Teixeira

Re:Keeping a windows over all others


Quote
> >Here is my question :
> >Is it possible under Win95 or / and NT to keep a window active,
> >nevermind the application ?

>     SetWindowPos(hWnd, HWND_TOP, 0, 0, 0, 0,
>                  SWP_NOSIZE | SWP_NOMOVE);

>     SetForeGroundWindow(hWnd);

>     And process the WM_ACTIVE and WM_ACTIVATEAPP
>     messages to avoid your window from been deactivated,
>     call SetActiveWindow.

Thank you, it 's perfect !

Other Threads