Download Source Code

CDlgMover Class Reference

Encapsulates functionality needed to handle docking window. More...

#include <DlgMover.h>

List of all members.

Public Member Functions

BOOL SetSizeCursor (POINT pt, BOOL bMove)
 Sets the appropriate window sizing cursor.
BOOL SetAppBarPos (LPRECT pRect)
 Allocates desktop space for docking.
BOOL OnSize ()
 Call when window is resized.
BOOL OnMove (int x, int y)
 Call when window is moved.
BOOL GetAppBarPos (LPRECT pRect)
 Returns the desired position of the window.
LRESULT OnAppBarMsg (WPARAM wParam, LPARAM lParam)
 Call in response to app bar message.
void DestroyAppBar ()
 Destroys the app bar.
BOOL CreateAppBar (LPRECT pRect=NULL)
 Reserves desktop space for app bar.
void KillAppBar ()
 Releases desktop space for app bar.
BOOL InitAppBar (HWND hWnd, UINT uMsg)
 Initializes app bar handling.
BOOL Dock (HWND hWnd, LPPOINT pt, LPPOINT cursor)
 Call to dock the app bar.
BOOL OnMouseMove (UINT nFlags, POINT point)
 Call in response to WM_MOUSEMOVE.
BOOL OnLButtonUp ()
 Call in response to WM_LBUTTONUP.
void OnLButtonDown (HWND hWnd, POINT point, HWND hCapture=NULL)
 Call in response to WM_LBUTTONDOWN.
 CDlgMover ()
 Constructor.
virtual ~CDlgMover ()
 Destructor.
BOOL IsMoving ()
 Returns non-zero if window is being moved.
void SetFrameWindow (HWND hWnd)
 Sets the frame window handle.
void SetDock (long x, long y)
 Sets dock point.
void SizeDock (BOOL b)
 Allows window to be sized when docked.
void Size (DWORD dw, HWND hWnd)
 Sets initial undocked window size.
void SetDockingSize (long w, long h)
 Sets initial docked size.
void SetDragPoint (long x, long y)
 Sets the drag point.
void SetMinTrackSize (long cx, long cy)
 Sets the minimum size for the window.
void SetMaxTrackSize (long cx, long cy)
 Sets the maximum size for the window.
void AllowDocking (DWORD f)
 Sets allowed docking positions.
void SetEdgeSize (long x, long y)
 Sets the size of the resizing edge area.

Static Public Member Functions

static BOOL GetPos (HWND hWnd, POINT *pPoint)
 Returns window position.
static BOOL SetPos (HWND hWnd, POINT point)
 Sets window position.


Detailed Description

Encapsulates functionality needed to handle docking window.

This encapsulates the functionality needed to create a dockable window.


Member Function Documentation

void CDlgMover::AllowDocking DWORD  f  )  [inline]
 

Sets allowed docking positions.

Parameters:
[in] f - Flags indicating allowed docking positions
  • DM_DOCKLEFT - Left docking
  • DM_DOCKTOP - Top docking
  • DM_DOCKRIGHT - Right docking
  • DM_DOCKBOTTOM - Bottom docking
  • DM_DOCKALL - Any docking

BOOL CDlgMover::CreateAppBar LPRECT  pRect = NULL  ) 
 

Reserves desktop space for app bar.

Parameters:
[in] pRect - Position of app bar
Returns:
Non-zero if success
See also:

BOOL CDlgMover::Dock HWND  hWnd,
LPPOINT  pt,
LPPOINT  cursor
 

Call to dock the app bar.

Parameters:
[in] hWnd - Handle to app bar window
[in] pt - Point to dock window
[in] cursor - Cursor position
Returns:
Non-zero if docked
See also:

BOOL CDlgMover::GetAppBarPos LPRECT  pRect  ) 
 

Returns the desired position of the window.

Parameters:
[out] pRect - Receives position
Returns:
Non-zero if success
See also:

BOOL CDlgMover::GetPos HWND  hWnd,
POINT *  pPoint
[static]
 

Returns window position.

Parameters:
[in] hWnd - Handle to window
[out] pPoint - Receives window position
Returns:
Non-zero if success
See also:

BOOL CDlgMover::InitAppBar HWND  hWnd,
UINT  uMsg
 

Initializes app bar handling.

Parameters:
[in] hWnd - App bar window handle
[in] uMsg - App bar message callback value
Returns:
Non-zero if success
See also:

LRESULT CDlgMover::OnAppBarMsg WPARAM  wParam,
LPARAM  lParam
 

Call in response to app bar message.

Parameters:
[in] wParam - Pass on from Operating system
[in] lParam - Pass on from Operating system
Call this function when your window receives an appbar message.

Returns:
Windows return value.
See also:

void CDlgMover::OnLButtonDown HWND  hWnd,
POINT  point,
HWND  hCapture = NULL
 

Call in response to WM_LBUTTONDOWN.

Parameters:
[in] hWnd - Handle to window
[in] point - Cursor position
[in] hCapture - Handle to window receiving input capture.
Returns:
See also:

BOOL CDlgMover::OnLButtonUp  ) 
 

Call in response to WM_LBUTTONUP.

Returns:
Non-zero if window should be redrawn
See also:

BOOL CDlgMover::OnMouseMove UINT  nFlags,
POINT  point
 

Call in response to WM_MOUSEMOVE.

Parameters:
[in] nFlags - Mouse move flags
[in] point - Cursor position
Returns:
Non-zero if window should be redrawn.
See also:

BOOL CDlgMover::OnMove int  x,
int  y
 

Call when window is moved.

Parameters:
[in] x - New horizontal offset
[in] y - New vertical offset
Returns:
Non-zero on success
See also:

BOOL CDlgMover::OnSize  ) 
 

Call when window is resized.

Returns:
Non-zero if success

BOOL CDlgMover::SetAppBarPos LPRECT  pRect  ) 
 

Allocates desktop space for docking.

Parameters:
[in] pRect - Docking area
Returns:
Non-zero if success
See also:

void CDlgMover::SetDock long  x,
long  y
[inline]
 

Sets dock point.

Parameters:
[in] x - Horizontal offset of dock point
[in] y - Vertical offset of dock point

void CDlgMover::SetDockingSize long  w,
long  h
[inline]
 

Sets initial docked size.

Parameters:
[in] w - Docked width
[in] h - Docked height
Returns:
See also:

void CDlgMover::SetDragPoint long  x,
long  y
[inline]
 

Sets the drag point.

Parameters:
[in] x - Horizontal offset of drag point
[in] y - Vertical offset of drag point

void CDlgMover::SetEdgeSize long  x,
long  y
[inline]
 

Sets the size of the resizing edge area.

Parameters:
[in] x - Horizontal size in pixels
[in] y - Veritcal size in pixels

void CDlgMover::SetFrameWindow HWND  hWnd  )  [inline]
 

Sets the frame window handle.

Parameters:
[in] hWnd - Window handle

void CDlgMover::SetMaxTrackSize long  cx,
long  cy
[inline]
 

Sets the maximum size for the window.

Parameters:
[in] cx - Maximum horizontal size
[in] cy - Maximum vertical size

void CDlgMover::SetMinTrackSize long  cx,
long  cy
[inline]
 

Sets the minimum size for the window.

Parameters:
[in] cx - Minimum horizontal size
[in] cy - Minimum vertical size

BOOL CDlgMover::SetPos HWND  hWnd,
POINT  point
[static]
 

Sets window position.

Parameters:
[in] hWnd - Handle of window
[in] point - Contains new position of window
Returns:
Non-zero if success
See also:

BOOL CDlgMover::SetSizeCursor POINT  pt,
BOOL  bMove
 

Sets the appropriate window sizing cursor.

Parameters:
[in] pt - Current cursor position
[in] bMove - Set to non-zero to update window size.
Returns:
Non-zero if success
See also:

void CDlgMover::Size DWORD  dw,
HWND  hWnd
[inline]
 

Sets initial undocked window size.

Parameters:
[in] dw - Window size
[in] hWnd - Handle to window

void CDlgMover::SizeDock BOOL  b  )  [inline]
 

Allows window to be sized when docked.

Parameters:
[in] b - Non-zero to allow docked window sizing.


The documentation for this class was generated from the following files:
  • inc/DlgMover.h
  • DlgMover.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL