Chapter 12: Dialog-Based Windows Visual C++ and MFC Fundamentals
that default. If for any reason you want to display a button on the Taskbar for the tool
window, add the WS_EX_APPWINDOW extended style.
WS_EX_TOPMOST: If you want your window to stay on top of another or other
windows, you have two choices. If the window you are creating, such as a dialog box, is
being added to a frame-based or a form-based application and you want that window to
always be on top of its parent window, add the WS_VISIBLE style to it and display it
using ShowWindow(SW_SHOW). If you want the window to always be on top of all
other windows regardless of their applications, add the WS_EX_TOPMOST extended
style to it.
WS_EX_CLIENTEDGE: A window appears sunken when its body is sunk with regards
to its borders. To create a dialog box with a sunken body, at design time, check its Client
Edge check box or set it to True:
This is equivalent to applying the WS_EX_CLIENTEDGE style
WS_EX_WINDOWEDGE: A window can have an inside body that appears to be raised
with regards to its borders. Such a window can be created by adding the
WS_EX_WINDOWEDGE style.
WS_EX_STATICEDGE: To create a window with a 3-dimensional thin border, at
design time, check its Static Edge check box or set it to True. This is the same as adding
the WS_EX_STATICEDGE.
WS_EX_PALETTEWINDOW: To create a dialog box that has a raised border and
stays on top of others, which is equivalent to combining the WS_EX_WINDOWEDGE
and the WS_EX_TOPMOST styles, in the resource file, add the
WS_EX_PALETTEWINDOW value in the EXSTYLE line
WS_EX_OVERLAPPEDWINDOW: A window is referred to as overlapped when it
presents a combination of a sunk and a raised edge. Such a window can be created by
either combining the WS_EX_CLIENTEDGE and the WS_EX_WINDOWEDGE
styles or by using the WS_EX_OVERLAPPEDWINDOW.
WS_EX_ACCEPTFILES: If you are creating a dialog box that will be accepting files
dragged from other window, at design time, check the Accept Files check box or set it to
True. You can also do this in the resource file by adding the WS_EX_ACCEPTFILES
extended style.