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

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.