Windows Window Library
[Libraries]


Detailed Description

Created: 13th January 2007 Updated: 13th January 2007.

This library contains components that .


Classes

struct  IDD_to_type
 Turns an integral value into a type. More...
class  AboutDialog
 About dialog class based on a type that specifies an Id, and a parent window type. More...
class  AboutDialogId
 About dialog class based from an Id. More...
class  EnhancedWindow
 This template is a veneer that provides various useful (and usually missing) member functions of dialogs and parent windows. More...
class  Window
 This class inherits from ATL's CWindow, and provides enhanced string operations (using string access shims) and additional functionality (via the EnhancedWindow mixin class template). More...
class  console_colour_scope
 Provides scoping of the colour (and intensity) of the console. More...
class  HDC_scope
 Scopes the device context of a window. More...
class  setcursor_scope
 Provides scoping of a window's cursor. More...
class  setfocus_scope
 Provides scoping of the focus window. More...
class  window_enable_scope
 Provides scoping of the enable status of a window. More...
class  window_icon_scope
 Provides scoping of the icon(s) of a window. More...
class  window_redraw_scope
 Provides scoping of the redraw status of a window. More...
class  window_text_scope
 Provides scoping of the text of a window. More...
struct  window_traits
 Traits for accessing the correct registry functions for a given character type. More...
class  window_update_scope
 Provides scoping of the update-status of a window. More...
class  window_visible_scope
 Provides scoping of the visible status of a window. More...
class  zorder_iterator_tmpl
 Iterates over the Z-order of window peers. More...
class  zorder_sequence_base
 Window peer sequence. More...

Typedefs

typedef zorder_iterator_tmpl
< zorder_iterator_forward_traits > 
zorder_iterator
 Specialisation of zorder_iterator_tmpl that searches a set of window peers in the forward direction.
typedef zorder_sequence_base
< zorder_iterator_base::fromFirstChild,
zorder_iterator_base::atLastChild > 
child_window_sequence
 Specialisation of zorder_sequence_base that searches the children of a given window.
typedef zorder_sequence_base
< zorder_iterator_base::fromFirstPeer,
zorder_iterator_base::atLastPeer > 
window_peer_sequence
 Specialisation of zorder_sequence_base that searches the peers of a given window.

Functions

STLSOFT_INLINE HFONT winstl__get_window_font (HWND hwnd)
 Gets the font associated with the window.
STLSOFT_INLINE void winstl__set_window_font (HWND hwnd, HFONT hfont, int bRedraw)
 Sets the window's font.
HFONT get_window_font (HWND hwnd)
 Gets the font associated with the window.
void set_window_font (HWND hwnd, HFONT hfont, bool bRedraw=true)
 Sets the window's font.
STLSOFT_INLINE ws_sptrint_t winstl__GetExStyle (HWND h)
 Gets the extended style of the window.
STLSOFT_INLINE ws_sptrint_t winstl__SetStyle (HWND h, ws_sptrint_t s)
 Sets the style of the window.
STLSOFT_INLINE ws_sptrint_t winstl__SetExStyle (HWND h, ws_sptrint_t x)
 Sets the extended style of the window.
STLSOFT_INLINE ws_sptrint_t winstl__ModifyStyle (HWND h, ws_sptrint_t sRem, ws_sptrint_t sAdd)
 Modifies the style of the window.
STLSOFT_INLINE ws_sptrint_t winstl__ModifyExStyle (HWND h, ws_sptrint_t sRem, ws_sptrint_t sAdd)
 Modifies the extended style of the window.
STLSOFT_INLINE int winstl__IsWindowClassA (HWND hwnd, char const *name)
 Tests whether the given window has the given window class.
STLSOFT_INLINE int winstl__IsWindowClassW (HWND hwnd, wchar_t const *name)
 Tests whether the given window has the given window class.
STLSOFT_INLINE void winstl__EnableDlgItem (HWND hwnd, int id, BOOL bEnable)
 Enables/disable a dialog item.
STLSOFT_INLINE int winstl__IsDlgItemEnabled (HWND hwnd, int id)
 Elicits the enable status of a dialog item.
STLSOFT_INLINE int winstl__GetDlgItemTextLength (HWND hwnd, int id)
 Gets the text length of a dialog item's window contents.
STLSOFT_INLINE HINSTANCE winstl__GetWindowInstance (HWND hwnd)
 Gets the HINSTANCE associated with a given window.
ws_sptrint_t GetStyle (HWND h)
 Gets the style of the window.
ws_sptrint_t GetExStyle (HWND h)
 Gets the extended style of the window.
ws_sptrint_t SetStyle (HWND h, ws_sptrint_t s)
 Sets the style of the window.
ws_sptrint_t SetExStyle (HWND h, ws_sptrint_t x)
 Sets the extended style of the window.
ws_sptrint_t ModifyStyle (HWND h, ws_sptrint_t sRem, ws_sptrint_t sAdd)
 Modifies the style of the window.
ws_sptrint_t ModifyExStyle (HWND h, ws_sptrint_t sRem, ws_sptrint_t sAdd)
 Modifies the extended style of the window.
bool IsWindowClass (HWND hwnd, char const *name)
 Tests whether the given window has the given window class.
bool IsWindowClass (HWND hwnd, wchar_t const *name)
 Tests whether the given window has the given window class.
void EnableDlgItem (HWND hwnd, int id, bool bEnable)
 Enables/disable a dialog item.
bool IsDlgItemEnabled (HWND hwnd, int id)
 Elicits the enable status of a dialog item.
int GetDlgItemTextLength (HWND hwnd, int id)
 Gets the text length of a dialog item's window contents.
HINSTANCE GetWindowInstance (HWND hwnd)
 Gets the HINSTANCE associated with a given window.
HWND FindFirstChildById (HWND hwndParent, int id)
 Finds the first descendant window with the given id.
ws_sint_t calc_width (SIZE const &size)
 Calculates the width of a SIZE instance.
ws_sint_t calc_width (RECT const &rc)
 Calculates the width of a RECT instance.
ws_sint_t calc_height (SIZE const &size)
 Calculates the height of a SIZE instance.
ws_sint_t calc_height (RECT const &rc)
 Calculates the height of a RECT instance.


Typedef Documentation

typedef zorder_sequence_base< zorder_iterator_base::fromFirstChild , zorder_iterator_base::atLastChild > child_window_sequence

Specialisation of zorder_sequence_base that searches the children of a given window.

typedef zorder_sequence_base< zorder_iterator_base::fromFirstPeer , zorder_iterator_base::atLastPeer > window_peer_sequence

Specialisation of zorder_sequence_base that searches the peers of a given window.

typedef zorder_iterator_tmpl<zorder_iterator_forward_traits> zorder_iterator

Specialisation of zorder_iterator_tmpl that searches a set of window peers in the forward direction.


Function Documentation

ws_sint_t winstl::calc_height ( RECT const &  rc  )  [inline]

Calculates the height of a RECT instance.

ws_sint_t winstl::calc_height ( SIZE const &  size  )  [inline]

Calculates the height of a SIZE instance.

ws_sint_t winstl::calc_width ( RECT const &  rc  )  [inline]

Calculates the width of a RECT instance.

ws_sint_t winstl::calc_width ( SIZE const &  size  )  [inline]

Calculates the width of a SIZE instance.

void winstl::EnableDlgItem ( HWND  hwnd,
int  id,
bool  bEnable 
) [inline]

Enables/disable a dialog item.

References winstl__EnableDlgItem().

Referenced by EnhancedWindow< atlstl::Window >::ShowAndEnableDlgItem().

HWND winstl::FindFirstChildById ( HWND  hwndParent,
int  id 
) [inline]

Finds the first descendant window with the given id.

Parameters:
hwndParent The window whose children will be searched
id The dialog id to search for
Returns:
Either the window handle of the first child window (or the parent itself) that matches the id, or NULL if no windows match
Note:
Because several levels of windows may be searched, it's possible for more than one child window to have the given id. This function will return only the first one found. Which one is determined by the internals of the EnumChildWindows() API function.

hwndParent is included in the search, so if it has the given id, it will be returned

HFONT winstl::get_window_font ( HWND  hwnd  )  [inline]

Gets the font associated with the window.

References winstl__get_window_font().

int winstl::GetDlgItemTextLength ( HWND  hwnd,
int  id 
) [inline]

Gets the text length of a dialog item's window contents.

References winstl__GetDlgItemTextLength().

ws_sptrint_t winstl::GetExStyle ( HWND  h  )  [inline]

Gets the extended style of the window.

References winstl__GetExStyle().

ws_sptrint_t winstl::GetStyle ( HWND  h  )  [inline]

Gets the style of the window.

HINSTANCE winstl::GetWindowInstance ( HWND  hwnd  )  [inline]

Gets the HINSTANCE associated with a given window.

References winstl__GetWindowInstance().

bool winstl::IsDlgItemEnabled ( HWND  hwnd,
int  id 
) [inline]

Elicits the enable status of a dialog item.

References winstl::BOOL2bool(), and winstl__IsDlgItemEnabled().

bool winstl::IsWindowClass ( HWND  hwnd,
wchar_t const *  name 
) [inline]

Tests whether the given window has the given window class.

References winstl::BOOL2bool(), and winstl__IsWindowClassW().

bool winstl::IsWindowClass ( HWND  hwnd,
char const *  name 
) [inline]

Tests whether the given window has the given window class.

References winstl::BOOL2bool(), and winstl__IsWindowClassA().

ws_sptrint_t winstl::ModifyExStyle ( HWND  h,
ws_sptrint_t  sRem,
ws_sptrint_t  sAdd 
) [inline]

Modifies the extended style of the window.

References winstl__ModifyExStyle().

ws_sptrint_t winstl::ModifyStyle ( HWND  h,
ws_sptrint_t  sRem,
ws_sptrint_t  sAdd 
) [inline]

Modifies the style of the window.

References winstl__ModifyStyle().

void winstl::set_window_font ( HWND  hwnd,
HFONT  hfont,
bool  bRedraw = true 
) [inline]

Sets the window's font.

References winstl__set_window_font().

ws_sptrint_t winstl::SetExStyle ( HWND  h,
ws_sptrint_t  x 
) [inline]

Sets the extended style of the window.

References winstl__SetExStyle().

ws_sptrint_t winstl::SetStyle ( HWND  h,
ws_sptrint_t  s 
) [inline]

Sets the style of the window.

References winstl__SetStyle().

STLSOFT_INLINE void winstl__EnableDlgItem ( HWND  hwnd,
int  id,
BOOL  bEnable 
)

Enables/disable a dialog item.

References STLSOFT_NS_GLOBAL.

Referenced by winstl::EnableDlgItem().

STLSOFT_INLINE HFONT winstl__get_window_font ( HWND  hwnd  ) 

Gets the font associated with the window.

References stlsoft_reinterpret_cast.

Referenced by winstl::get_window_font().

STLSOFT_INLINE int winstl__GetDlgItemTextLength ( HWND  hwnd,
int  id 
)

Gets the text length of a dialog item's window contents.

References STLSOFT_NS_GLOBAL.

Referenced by winstl::GetDlgItemTextLength().

STLSOFT_INLINE ws_sptrint_t winstl__GetExStyle ( HWND  h  ) 

Gets the extended style of the window.

Referenced by winstl::GetExStyle(), and winstl__ModifyExStyle().

STLSOFT_INLINE HINSTANCE winstl__GetWindowInstance ( HWND  hwnd  ) 

Gets the HINSTANCE associated with a given window.

References stlsoft_reinterpret_cast.

Referenced by winstl::GetWindowInstance().

STLSOFT_INLINE int winstl__IsDlgItemEnabled ( HWND  hwnd,
int  id 
)

Elicits the enable status of a dialog item.

References STLSOFT_NS_GLOBAL.

Referenced by winstl::IsDlgItemEnabled().

STLSOFT_INLINE int winstl__IsWindowClassA ( HWND  hwnd,
char const *  name 
)

Tests whether the given window has the given window class.

References STLSOFT_NS_GLOBAL, STLSOFT_NUM_ELEMENTS, stlsoft_static_cast, and WINSTL_ASSERT.

Referenced by winstl::IsWindowClass().

STLSOFT_INLINE int winstl__IsWindowClassW ( HWND  hwnd,
wchar_t const *  name 
)

Tests whether the given window has the given window class.

References STLSOFT_NS_GLOBAL, STLSOFT_NUM_ELEMENTS, stlsoft_static_cast, and WINSTL_ASSERT.

Referenced by winstl::IsWindowClass().

STLSOFT_INLINE ws_sptrint_t winstl__ModifyExStyle ( HWND  h,
ws_sptrint_t  sRem,
ws_sptrint_t  sAdd 
)

Modifies the extended style of the window.

References winstl__GetExStyle(), and winstl__SetExStyle().

Referenced by winstl::ModifyExStyle().

STLSOFT_INLINE ws_sptrint_t winstl__ModifyStyle ( HWND  h,
ws_sptrint_t  sRem,
ws_sptrint_t  sAdd 
)

Modifies the style of the window.

References winstl__SetStyle().

Referenced by winstl::ModifyStyle().

STLSOFT_INLINE void winstl__set_window_font ( HWND  hwnd,
HFONT  hfont,
int  bRedraw 
)

Sets the window's font.

References stlsoft_reinterpret_cast, and stlsoft_static_cast.

Referenced by winstl::set_window_font().

STLSOFT_INLINE ws_sptrint_t winstl__SetExStyle ( HWND  h,
ws_sptrint_t  x 
)

Sets the extended style of the window.

Referenced by winstl::SetExStyle(), and winstl__ModifyExStyle().

STLSOFT_INLINE ws_sptrint_t winstl__SetStyle ( HWND  h,
ws_sptrint_t  s 
)

Sets the style of the window.

Referenced by winstl::SetStyle(), and winstl__ModifyStyle().


Generated on Thu Jun 10 08:58:21 2010 for STLSoft by  doxygen 1.5.6