PMCheckBox

Extends PMWindow as public

Radio button control window class.

The PMCheckBox class creates and manages check box control windows. A check box is a square box with associated text that represents a choice. When a user selects the choice, the check box is filled to indicate that the choice is selected. If the user selects the check box again, the choice is deselected.

You can construct and destruct objects of this class.


 * Source:pm_checkbox.h:27
 * Author:Dmitry A.Steklenev
 * Version: 1.0

constructor PMCheckBox
Wraps the check box control window object around an existing presentation window handle.

The wrapped window object usually have a limited functionality. You can query and set the window attributes, size, position and visibility status.

public 'PMCheckBox' ( HWND handle )
 * Source: pm_checkbox.h:39
 * Code:

constructor PMCheckBox
Wraps the check box control window object around an existing child window with the specified identifier.

The wrapped window object usually have a limited functionality. You can query and set the window attributes, size, position and visibility status.

public 'PMCheckBox' ( HWND hparent, SHORT id )
 * Source: pm_checkbox.h:53
 * Params:
 * Code:

constructor PMCheckBox
Constructs the check box control window.

public 'PMCheckBox' ( SHORT id, const char * text , HWND hparent , LONG x , LONG y , LONG cx , LONG cy , ULONG style )
 * Source:pm_checkbox.h:99
 * Params:
 * See Also:PMWindow
 * Code:

method check
Sets the checked state of a check box control.

public virtual void 'check' ( USHORT state )
 * Source:pm_checkbox.h:109
 * Param:
 * Code:

method check
Returns the checked state of a check box control.


 * Source:pm_checkbox.h:119
 * Returns:0 The check box control is in unchecked state.
 * 1 The check box control is in checked state.


 * 2 The check box control is in indeterminate state.

public virtual USHORT 'check' const
 * Code:

method attach_accelerators
Replaces the accelerator keys used by the window. public virtual void 'attach_accelerators' ( SHORT res_id, HMODULE hmodule )
 * Inherited From:PMWindow
 * Source:pm_window.h:603
 * Params:
 * Code:

method auto_delete_object
Determines whether to delete the window object when the presentation window is destroyed.

The deletion occurs when the window system dispatches a destroy event to the window.

public virtual void 'auto_delete_object' ( BOOL state = TRUE )
 * Inherited From:PMWindow
 * Source:pm_window.h
 * Code:

method capture_pointer
Captures mouse pointer.

If capture is true, pointer events are sent only to this window even if the pointer is outside of this window. If capture is false, the window releases the pointer capture. If you attempt to capture the pointer when another window currently is capturing the pointer, an exception is thrown.

public virtual void 'capture_pointer' (BOOL capture = TRUE )
 * Inherited From:PMWindow
 * Source: pm_window.h:537
 * Code:

method center_at
Centers the window concerning his owner window.

Inherited From:PMWindow]] Source:pm_window.h:253 Code: public virtual void 'center_at'

method child
Returns the handle of the child window with the specified identity.


 * Inherited From:PMWindow
 * Source: pm_window.h:203
 * Param:'''
 * id:Identifier of the child window.


 * Returns:Child-window handle or NULLHANDLE if no child window of the specified identity exists.

public HWND 'child' (SHORT id) const
 * Code:

method color
Returns the specified color value.

public LONG 'color' (LONG type ) const
 * Inherited From:PMWindow
 * Source: pm_window.h:371
 * Param:
 * Returns:The RGB color value. If you have not set the specified color, the default color value CLR_DEFAULT is returned.
 * Code:

method color
Sets the specified color value.
 * Inherited From:PMWindow
 * Source:pm_window.h:426
 * Params:
 * See Also:PMWindow::color

public void 'color' (                                     LONG type,                                      LONG color )
 * Code:

method destroy
Destroys the presentation window.

Destroying the associated presentation window for this object.

public virtual void 'destroy'
 * Inherited From:PMWindow
 * Source: pm_window.h:158
 * Code:

method detach_accelerators
Detaches the accelerator keys used by the window.

public virtual void 'detach_accelerators'
 * Inherited From: PMWindow
 * Source: pm_window.h:609
 * Code:

method disable
Prevents keyboard and mouse input from being sent to the window.
 * Inherited From: PMWindow
 * Source:' pm_window.h:450

public virtual void 'disable'
 * Code:

method dispatch
Dispatch system native events.

PMWindow calls this function when a system native window event occurs.

protected virtual MRESULT 'dispatch' (                                                     ULONG msg,                                                      MPARAM mp1 ,                                                      MPARAM mp2 )
 * Inherited From: PMWindow
 * Source: pm_window.h:703
 * Code:

method dispatch_everything
Dispatch all not catched events.

A virtual method that provides default implementation for all events that occur on every window.

protected virtual MRESULT 'dispatch_everything' (                                                                 ULONG msg,                                                                  MPARAM mp1 ,                                                                  MPARAM mp2 )
 * Inherited From: PMWindow
 * Source:pm_window.h:712
 * Code:

method enable
Enables the window to accept keyboard and mouse input. public virtual void 'enable' ( BOOL state = TRUE )
 * Inherited From: PMWindow
 * Source: pm_window.h:448
 * Code:

method enable_drop
Enables the window to accept dropped objects. public virtual void 'enable_drop' ( LONG type )
 * Inherited From: PMWindow
 * Source: pm_window.h:463
 * Code:

method font
Sets a new font to be used by the window. public virtual void 'font' (const char * font )
 * Inherited From:PMWindow
 * Source: pm_window.h:255
 * Code:

method font
Sets a new system font to be used by the window. public virtual void 'font' (int id )
 * Inherited From: PMWindow
 * Source:pm_window.h:276
 * Param:
 * Code:

method frame
Return the handle of the first frame window associated with this window. public virtual HWND 'frame' const
 * Inherited From: PMWindow
 * Source: pm_window.h:246
 * Code:

method handle
Returns the presentation window handle.

public HWND 'handle' const
 * Inherited From: PMWindow
 * Source: pm_window.h:161
 * Code:

method handle_events
Handle events.

Attaches the handler to the PMWindow object. The windows's dispatch function is called to process all events sent or posted to the window.

protected void 'handle_events'
 * Inherited From: PMWindow
 * Source: pm_window.h:684
 * Code:

method has_focus
Has focus.

If the window has the input focus, TRUE is returned. Otherwise, FALSE is returned.

public virtual BOOL 'has_focus' const
 * Inherited From: PMWindow
 * Source:pm_window.h:485
 * Code:

method has_pointer_captured
Has pointer captured.

If this window is currently capturing pointer events, true is returned. Otherwise, false is returned.

public virtual BOOL 'has_pointer_captured' const
 * Inherited From: PMWindow
 * Source: pm_window.h:558
 * Code:

method hide
Makes the window invisible.

public virtual void 'hide'
 * Inherited From: PMWindow
 * Source: pm_window.h:435
 * Code:

method id
Returns the window identifier. Inherited From:PMWindow]] Source:pm_window.h:163 Code:

method id
Sets the window identifier. public virtual void 'id' (SHORT new_id )
 * Inherited From: PMWindow
 * Source: pm_window.h:165
 * Code:

method invalidate
This method adds the whole window to a window's update region.

The update region is a subregion of a window that is deemed "invalid" or incorrect in visual terms and is in need of redrawing.

Inherited From:PMWindow Source:pm_window.h:505 Code:

method invalidate
This method adds a rectangle to a window's update region.

The update region is a subregion of a window that is deemed "invalid" or incorrect in visual terms and is in need of redrawing.

Inherited From:PMWindow Source:pm_window.h:495 Code: public virtual void 'invalidate' ( const PMRect &rect ,
 * BOOL include_children = TRUE )
 * }
 * BOOL include_children = TRUE )
 * }

method is_auto_delete_object
If the window object is deleted when a destroy event is dispatched to the window, TRUE is returned. Inherited From:PMWindow]] Source:pm_window.h:672 Code: public virtual BOOL 'is_auto_delete_object'

method is_enabled
Is the window enabled.

Inherited From:PMWindow]] Source:pm_window.h:452 Code: public virtual BOOL 'is_enabled' const

method is_valid
Is the window valid.

If this object represents a valid window in the window system, TRUE is returned. If the window has yet to be created or has already been destroyed, FALSE is returned.

Inherited From:PMWindow]] Source:pm_window.h:473 Code: public virtual BOOL 'is_valid' const

method is_visible
Is the window visible.

If the window's style is set to visible, TRUE is returned. Otherwise, FALSE is returned. A window can have the style visible and yet not be showing if it is covered by another window.

Inherited From:PMWindow]] Source:pm_window.h:445 Code: public virtual BOOL 'is_visible'

method owner
Returns the owner window handle.

Windows that send messages send them to their owner. When an owner window is destroyed, all windows owned by it are also destroyed. The owner window must belong to the current thread.

Inherited From:PMWindow]] Source:pm_window.h:192 Code: public HWND 'owner' ( const

method owner
Sets the owner window.

Windows that send messages send them to their owner. When an owner window is destroyed, all windows owned by it are also destroyed. The owner window must belong to the current thread.

Inherited From:PMWindow]] Source:pm_window.h:240 Param: Code: public virtual void 'owner' ( HWND howner )

method parent
Returns the parent window handle.

The parent window provides the coordinate system used for positioning a child window. A window whose parent is the desktop window, is called a top-level or overlapped window.

Inherited From:PMWindow Source:pm_window.h:181 Code:

method parent
Sets the parent window.

The parent window provides the coordinate system used for positioning a child window. A window whose parent is the desktop window, is called a top-level or overlapped window.


 * Inherited From: PMWindow
 * Source:pm_window.h:227
 * Params:

public virtual void 'parent' (                                                    HWND hparent,                                                     BOOL redraw = TRUE )
 * Code:

method pid
Returns the process identifier that created the window.

public PID 'pid' const
 * Inherited From: PMWindow
 * Source: pm_window.h:169
 * Code:

method pointer
Returns the mouse pointer used when the mouse is over the window.

public virtual LONG 'pointer' const
 * Inherited From: PMWindow
 * Source: pm_window.h:592
 * Code:

method pointer
Sets the appearance used by the mouse pointer when it is over the window.
 * Inherited From: PMWindow
 * Source: pm_window.h:589
 * Param:

public virtual void 'pointer' (LONG id )
 * Code:

method post
Posts a message to window.

This method posts a message to the message queue associated with the window.

Inherited From:PMWindow Source:pm_window.h:630 Returns:Success indicator. Code: public BOOL 'post' ( ULONG msg,  MPARAM mp1 ,  MPARAM mp2 )

method rectangle
Sets the window's position and size.

public virtual void 'rectangle' (const PMRect &rect )
 * Inherited From: PMWindow
 * Source: pm_window.h:251
 * Code:

method rectangle
Returns the window rectangle. public virtual PMRect 'rectangle' const
 * Inherited From: PMWindow
 * Source:pm_window.h:429
 * Code:

static method rectangle
Returns the window rectangle. public static PMRect 'rectangle' ( HWND hwnd )
 * Inherited From: PMWindow
 * Source: pm_window.h:431
 * Code:

method release_pointer
Release mouse pointer.

Causes the window to release the pointer capture (pointer capture is set with the function capture_pointer).

This function causes mouse events to again be dispatched to the window underneath the mouse pointer.

Inherited From:PMWindow Source:pm_window.h:549 Code:

method send
Sends a message to window.

This method sends a message with identity msg to window, passing mp1 and mp2 as the parameters to the window.

Inherited From:PMWindow Source:pm_window.h:619 Code: public MRESULT 'send' ( ULONG msg, MPARAM mp1 , MPARAM mp2 )

method set_focus
Sets the input focus to the window.

Inherited From:PMWindow Source:pm_window.h:476 Code: public virtual void 'set_focus'

method show
Makes the window visible.

Inherited From:PMWindow Source:pm_window.h:433 Code: public virtual void 'show' ( BOOL state = TRUE )

method start_timer
This method starts a timer.

This method creates a timer identified by id, set to time out every timeout milliseconds. When a timer times out, a WM_TIMER message is posted.

A timeout value of zero causes the timer to timeout as fast as possible; generally, this is about 1/18 second.

A second call of this method, for a timer that already exists, resets that timer.

Inherited From:PMWindow Source:pm_window.h:646 Code: public virtual void 'start_timer' ( ULONG id, ULONG timeout )

method stop_handling_events
Stop handling events.

Detaches the handler from the PMWindow object. The window's dispatch function is no longer called to process events sent or posted to the window.

Inherited From:PMWindow Source:[[pm_window.h:694 Code: protected void 'stop_handling_events'

method stop_timer
This method stops a timer.

When this method is called, no further messages are received from the stopped timer, even if it has timed out.

Inherited From:PMWindow Source:pm_window.h:655 Code: public virtual void 'stop_timer' ( ULONG id )

method style
Returns the window style. Inherited From:PMWindow Source:pm_window.h:167 Code:

method text
Returns the window text. Inherited From:PMWindow]] Source:pm_window.h:297 Params:

method text
Sets the window text.

Inherited From:PMWindow]] Source:pm_window.h:249 Code: public virtual void 'text' ( const char * text )

method text_len
Returns the length of the window text.

Inherited From:PMWindow]] Source:pm_window.h:306 Returns:The length of the window text, excluding any null termination character.

Code: public virtual int 'text_len' const

method tid
Returns the thread identifier that created the window.

public TID 'tid' const
 * Inherited From: PMWindow
 * Source: pm_window.h:171
 * Code:

method translate
Translates the window text.

Translates the window text and all the child texts using for this purpose the current instance of the messages management object.

Inherited From:PMWindow]] Source:pm_window.h:286 Code: public virtual void 'translate'

method validate
This method subtracts a rectangle from a window's update region.

The update region is a subregion of a window that is deemed "invalid" or incorrect in visual terms and is in need of redrawing.

Inherited From:PMWindow]] Source:pm_window.h:515 Code: public virtual void 'validate' ( const PMRect]] &rect, BOOL include_children = TRUE )

method validate
This method subtracts the whole window from a window's update region.

The update region is a subregion of a window that is deemed "invalid" or incorrect in visual terms and is in need of redrawing.

Inherited From:PMWindow]] Source:pm_window.h:525 Code: public virtual void 'validate' ( BOOL include_children = TRUE )