Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does WS_EX_APPWINDOW do?

Tags:

winapi

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!

like image 959
AutoBotAM Avatar asked Nov 20 '11 20:11

AutoBotAM


2 Answers

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.
like image 127
David Heffernan Avatar answered Jan 03 '23 14:01

David Heffernan


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.

like image 26
shf301 Avatar answered Jan 03 '23 14:01

shf301