WinapiExtension
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | Public Attributes | List of all members
WindowParams Class Reference

Creation parameters for the Window class. More...

#include <Window.h>

Public Member Functions

 WindowParams ()
 
WindowParamsBackground (HBRUSH bg)
 
WindowParamsBackgroundNull ()
 
WindowParamsCursor (HCURSOR cursor)
 
WindowParamsExStyle (DWORD exStyle)
 
WindowParamsFullRedrawOnResize (bool set)
 
WindowParamsIcon (HICON icon)
 
WindowParamsInnerSize (int w, int h)
 
WindowParamsInnerSize (const SIZE &s)
 
WindowParamsMenu (HMENU menu)
 
WindowParamsParent (HWND parent)
 
WindowParamsPosition (int x, int y)
 
WindowParamsPosition (const POINT &p)
 
WindowParamsRect (const RECT &r)
 
WindowParamsSize (int w, int h)
 
WindowParamsSize (const SIZE &s)
 
WindowParamsStyle (DWORD style)
 
WindowParamsText (const tstring &text)
 

Public Attributes

WNDCLASSEX cls
 
DWORD creationExStyle
 
HMENU creationMenu
 
HWND creationParent
 
POINT creationPos
 
SIZE creationSize
 
DWORD creationStyle
 
tstring creationText
 

Detailed Description

Creation parameters for the Window class.

Constructor & Destructor Documentation

WindowParams::WindowParams ( )
inline

The default is a frame window, without parent or menu.

Member Function Documentation

WindowParams & WindowParams::Background ( HBRUSH  bg)
inline
Returns
Reference to this instance for method chaining.
WindowParams& WindowParams::BackgroundNull ( )
inline

Disables background drawing. Useful for windows that draw everything themselves.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Cursor ( HCURSOR  cursor)
inline
Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::ExStyle ( DWORD  exStyle)
inline

Set the extended window style.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::FullRedrawOnResize ( bool  set)
inline

Normally windows will only repaint areas that have been invalidated. With this parameter, a window will always be repainted in it's entirety.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Icon ( HICON  icon)
inline
Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::InnerSize ( int  w,
int  h 
)
inline

Set the window client size.
Style, Extended style and Menu will be used for this calculation.

Returns
Reference to this instance for method chaining.
WindowParams& WindowParams::InnerSize ( const SIZE &  s)
inline
See Also
InnerSize()
WindowParams & WindowParams::Menu ( HMENU  menu)
inline

Set the window menu.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Parent ( HWND  parent)
inline

Set the parent window.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Position ( int  x,
int  y 
)
inline

Set the top-left position of the window relative to it's parent.

Returns
Reference to this instance for method chaining.
WindowParams& WindowParams::Position ( const POINT &  p)
inline
See Also
Position()
WindowParams & WindowParams::Rect ( const RECT &  r)
inline

Set the window coordinates.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Size ( int  w,
int  h 
)
inline

Set the window frame size.

Returns
Reference to this instance for method chaining.
WindowParams& WindowParams::Size ( const SIZE &  s)
inline
See Also
Size()
WindowParams & WindowParams::Style ( DWORD  style)
inline

Set the window style.

Returns
Reference to this instance for method chaining.
WindowParams & WindowParams::Text ( const tstring text)
inline

Set the window text.

Returns
Reference to this instance for method chaining.

Member Data Documentation

WNDCLASSEX WindowParams::cls

The window class used during window creation.

Note
You cannot change hInstance and lpfnWndProc, everything else is allowed
DWORD WindowParams::creationExStyle

Extended style for the window.

HMENU WindowParams::creationMenu

Menu for the window.

HWND WindowParams::creationParent

Parent for the window.

POINT WindowParams::creationPos

Top-left position for the window.

SIZE WindowParams::creationSize

Full size for the window.

DWORD WindowParams::creationStyle

Style for the window.

tstring WindowParams::creationText

Text of the window (e.g. a caption for top level windows)


The documentation for this class was generated from the following file: