6

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!

AutoBotAM
  • 1,485
  • 3
  • 18
  • 24

2 Answers2

27

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.
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • 3
    The rules described in Raymond Chen's article are incomplete. If the extended window style has `WS_EX_NOACTIVATE` or `WS_EX_TOOLWINDOW` set, the window won't have a taskbar button, even if it is a visible, unowned top-level window. – zett42 Jan 05 '18 at 16:58
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.

shf301
  • 31,086
  • 2
  • 52
  • 86
  • 1
    I was looking at http://msdn.microsoft.com/en-us/library/ms908193.aspx, haven't realized until now that that was the Windows CE page. – AutoBotAM Nov 20 '11 at 21:07