Exponent::GUI::Windowing::CWindowTools Class Reference

List of all members.

Detailed Description

Lots of tools for dealing with windows.

Date:
24/03/2005
Author:
Paul Chana
Version:
1.0.0 Initial version
Note:
All contents of this source code are copyright 2005 Exp Digital Uk.
This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
Certain sections of this code may come from other sources. They are credited where applicable.
If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk
Id
CWindowTools.hpp,v 1.7 2007/02/27 19:47:11 paul Exp

Definition at line 43 of file CWindowTools.hpp.

Static Public Member Functions


Member Function Documentation

static bool Exponent::GUI::Windowing::CWindowTools::computeCorrectedWindowArea ( const CDimension dimension,
CDimension dimensionToFill,
unsigned long  style,
unsigned long  exStyle = -1,
const bool  hasMenu = false 
) [static]

Compute the area actually required including extended styled border (if extended style is not required, simply set to -1, will convert
dimension to dimensionToFill, you should use dimensionToFill to create the window on mac simply copies the dimensions, as the sizing is done for you

Parameters:
dimension The dimension you want
dimensionToFill On return holds the new dimension
style The window style
exStyle The extended style
hasMenu Does the window have a menu
Return values:
bool True if filled properly, false otherwise

static long Exponent::GUI::Windowing::CWindowTools::computeLogicalSizeFromPointSize ( const long  pointSize  )  [static]

Compute the logical size from a point size. No equivalent for mac

Parameters:
pointSize The point size
Return values:
long The logical size

static bool Exponent::GUI::Windowing::CWindowTools::computeStringArea ( void *  drawContext,
const CString string,
CDimension dimension,
void *  winFont = NULL 
) [static]

Compute the area that a string takes up

Parameters:
drawContext On windows an HDC, on mac should be a font
string The string to compute the size of
dimension On return contains the string dimension
winFont The windows font (HFONT), must be valid on windows, must be NULL on mac!
Return values:
bool True if computed properly, false on error

static bool Exponent::GUI::Windowing::CWindowTools::computeStringAreaNoGDIPlusStartup ( HDC  drawContext,
const CString string,
CDimension dimension,
HFONT  font 
) [static]

Compute the string area, with no GDI+ startup routines.

Note:
This function expects you to have setup the GDI+ startup stuff, You should use this function if you are computing lots of strings
sizes sequentially (for example within a loop). Only to be used if you are sure you have GDI+
See also:
GdiplusStartup
Parameters:
drawContext The window HDC
string The string to size
dimension On output the size of the string
font The HFONT for the font used to display the string

static bool Exponent::GUI::Windowing::CWindowTools::getContentArea ( SWindowHandle windowHandle,
CDimension dimension 
) [static]

Get the dimensions of the content area (the area you can draw in)

Parameters:
windowHandle Handle for the window
dimension On return is filled with window area
Return values:
bool True if filled properly, false otherwise

static void Exponent::GUI::Windowing::CWindowTools::getDesktopWindow ( SWindowHandle handle  )  [static]

Get the desktop window

Parameters:
handle On return points to the handle of the desktop window

static void Exponent::GUI::Windowing::CWindowTools::getForeGroundWindow ( SWindowHandle handle  )  [static]

Get the foreground window

Parameters:
handle On return points to the handle of the forground window

static bool Exponent::GUI::Windowing::CWindowTools::getGlobalContentAreaCoordinates ( SWindowHandle windowHandle,
CRect areaToFill 
) [static]

Get the client area In screen coordinates

Parameters:
windowHandle The handle of the window
areaToFill On return contains the screen co-ordinates of the window handle
Return values:
bool True if filled properly, false otherwise

static void Exponent::GUI::Windowing::CWindowTools::getMousePosition ( CPoint point  )  [static]

Whats the mouse position

Parameters:
point On return is filled with the specified position

static bool Exponent::GUI::Windowing::CWindowTools::getWindowArea ( SWindowHandle windowHandle,
CRect areaToFill 
) [static]

Get the window area

Parameters:
windowHandle Handle for the window
areaToFill On return contains the window area
Return values:
bool True if filled properly, false otherwise

static void Exponent::GUI::Windowing::CWindowTools::getWindowFromPoint ( SWindowHandle handle,
const CPoint point 
) [static]

Get the window under a point

Parameters:
handle On return contains the window handle
point The position to find the window under

static bool Exponent::GUI::Windowing::CWindowTools::isWindowVisible ( SWindowHandle windowHandle  )  [static]

Is the window visible

Parameters:
windowHandle The window handle
Return values:
bool True if the window is visible, false otherwise

static void Exponent::GUI::Windowing::CWindowTools::setFocusWindow ( SWindowHandle windowHandle  )  [static]

Set the focus'd window

Parameters:
windowHandle The window handle to make focussed window

static void Exponent::GUI::Windowing::CWindowTools::setForeGroundWindow ( SWindowHandle windowHandle  )  [static]

Set the foreground window

Parameters:
windowHandle The window handle to make foreground

static void Exponent::GUI::Windowing::CWindowTools::setMousePosition ( const CPoint point  )  [static]

Set the cursor position

Parameters:
point The mouse position


Infinity API - Exponent::GUI::Windowing::CWindowTools Class Reference generated on 7 Mar 2007