What does WS_EX_APPWINDOW do?

12,033

Solution 1

WS_EX_APPWINDOW is an extended window style that is documented on MSDN. It is most definitely not deprecated and is a fully supported and widely used style.

The documentation states that the style:

Forces a top-level window onto the taskbar when the window is visible.

This is a relatively bland statement that undersells the purpose of this style. Normally the property that forces a top-level window onto the taskbar is the fact that the top-level window is unowned. Top-level owned windows do not, by default, appear on the taskbar. So, if for some reason you wish to put a top-level owned window onto the taskbar, then WS_EX_APPWINDOW is the solution.

Although there is an MSDN article that describes the rules for which windows appear in the taskbar, it is not as clear as it should be. Raymond Chen's article describes it much more precisely:

There are some basic rules on which windows go into the taskbar. In short:

  • If the WS_EX_APPWINDOW extended style is set, then it will show (when visible).
  • If the window is a top-level unowned window, then it will show (when visible).
  • Otherwise it doesn't show.

Solution 2

According to Extended Window Styles on MSDN it:

Forces a top-level window onto the taskbar when the window is visible.

I don't see anywhere on the CreateWindowEx documentation that marks it as no longer supported.

Share:
12,033
AutoBotAM
Author by

AutoBotAM

Updated on June 04, 2022

Comments

  • AutoBotAM
    AutoBotAM almost 2 years

    Either this is just a deprecated window style with no documentation, or I've made a flaw in searching for it.

    My question is, what does this flag do? Is there a supported equivalent to it that I may need?

    Advice is appreciated!