What is the main Window? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

What is the main Window?

If a process have some top level windows which have not parent/owner, what of them is the main? What API functions should I use in order to get the real main window, the window that Task Manager use for show its title when the user press Ctrl+Alt+Del?

Al Gonzlez.
GH15, Alta Calidad en Desarrollo de Sistemas.
[email protected], [email protected]


Comments

  • ChemanuelChemanuel Posts: 9Member
    : If a process have some top level windows which have not parent/owner, what of them is the main? What API functions should I use in order to get the real main window, the window that Task Manager use for show its title when the user press Ctrl+Alt+Del?
    :
    : Al Gonzlez.
    : GH15, Alta Calidad en Desarrollo de Sistemas.
    : [email protected], [email protected]
    :

    I think that every window is a child of the destop window. Perhaps calling EnumDesktopWindows() will help.

    hth

    Chemanuel

    [italic][blue]El rincn de Chemanuel[/blue][/italic]
    [blue]http://www.geocities.com/josempadron[/blue]


  • Sephiroth2Sephiroth2 Posts: 423Member
    The task manager will show the names of every top-level window that doesn't have the WS_EX_TOOLWINDOW extended stylebit set. There's no distinction between a "main window" and an "other window" apart from this style. Some applications use the WS_EX_APPWINDOW bit to mark their main window, but most don't. Just use the first window that doesn't have this extended style.

Sign In or Register to comment.