Macro For Creating a dwStyle for a window without a menu bar and title bar

Introduce For CreateWindowEx

Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. For more information about creating a window and for full descriptions of the other parameters of CreateWindowEx, see CreateWindow.

CreateWindowEx Syntax


Copy
HWND CreateWindowExA(
  DWORD     dwExStyle,
  LPCSTR    lpClassName,
  LPCSTR    lpWindowName,
  DWORD     dwStyle,
  int       X,
  int       Y,
  int       nWidth,
  int       nHeight,
  HWND      hWndParent,
  HMENU     hMenu,
  HINSTANCE hInstance,
  LPVOID    lpParam
);

The forth argument dwStyle indicated the style of the window being created. This parameter can be a combination of the window style values.

window style values

Macro Explanation:

WS_CLIPSIBLINGS

0x04000000L

Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.


WS_CLIPCHILDREN

0x02000000L

Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.


WS_POPUP

0x80000000L

The windows is a pop-up window. This style cannot be used with the WS_CHILD style.


Addition:In SCDN's win32 tutorial, this style was used to create a window with standard styles, including menu bars, maximize, minimize, close, etc.

WS_OVERLAPPEDWINDOW

(WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)

The window is an overlapped window. Same as the WS_TILEDWINDOW style.

posted @ 2019-01-23 15:51  威化饼干  阅读(250)  评论(0编辑  收藏  举报