mCtrl  0.9.0
propview.h File Reference

Property view control (MC_WC_PROPVIEW) More...

Go to the source code of this file.

Initialization Functions

BOOL mcPropView_Initialize (void)
 
void mcPropView_Terminate (void)
 

Window Class

#define MC_WC_PROPVIEWW   L"mCtrl.propView"
 
#define MC_WC_PROPVIEWA   "mCtrl.propView"
 

Control Styles

#define MC_PVS_NOPROPSETCREATE   0x0001
 Do not automatically create empty property set.
 
#define MC_PVS_SORTITEMS   0x0002
 Sort items alphabetically.
 

Control Messages

#define MC_PVM_GETPROPSET   (MC_PVM_FIRST + 0)
 Gets handle of the underlying property set.
 
#define MC_PVM_SETPROPSET   (MC_PVM_FIRST + 1)
 Installs another property set into the control.
 
#define MC_PVM_INSERTITEMW   (MC_PVM_FIRST + 2)
 Inserts an item into the underlying property set (unicode variant).
 
#define MC_PVM_INSERTITEMA   (MC_PVM_FIRST + 3)
 Inserts an item into the underlying property set (ANSI variant).
 
#define MC_PVM_SETITEMW   (MC_PVM_FIRST + 4)
 Sets an item in the underlying property set (unicode variant).
 
#define MC_PVM_SETITEMA   (MC_PVM_FIRST + 5)
 Sets an item in the underlying property set (ANSI variant).
 
#define MC_PVM_GETITEMW   (MC_PVM_FIRST + 6)
 Gets an item from the underlying property set (unicode variant).
 
#define MC_PVM_GETITEMA   (MC_PVM_FIRST + 7)
 Gets an item from the underlying property set (ANSI variant).
 
#define MC_PVM_DELETEITEM   (MC_PVM_FIRST + 8)
 Delete an item from the underlying property set.
 
#define MC_PVM_DELETEALLITEMS   (MC_PVM_FIRST + 9)
 Delete all items from the underlying property set.
 
#define MC_PVM_GETITEMCOUNT   (MC_PVM_FIRST + 10)
 Gets count of items in the underlying property set.
 

Unicode Resolution

#define MC_WC_PROPVIEW   MCTRL_NAME_AW(MC_WC_PROPVIEW)
 
#define MC_PVITEM   MCTRL_NAME_AW(MC_PVITEM)
 
#define MC_PVM_INSERTITEM   MCTRL_NAME_AW(MC_PVM_INSERTITEM)
 
#define MC_PVM_SETITEM   MCTRL_NAME_AW(MC_PVM_SETITEM)
 
#define MC_PVM_GETITEM   MCTRL_NAME_AW(MC_PVM_GETITEM)
 

Detailed Description

Property view control (MC_WC_PROPVIEW)

Property view provides a way how to present larger set of some editable properties in a relatively condensed way.

Each property has a textual label, a current value (MC_HVALUE) and few other attributes. Few ways how the property can be edited by the user are supported and the particular way is selected by flags of each item.

The collection of properties are managed by a property set (see MC_HPROPSET) so the messages of the control manipulating with the properties are just forwarded to the underlying property set.

Normally the control creates its own property set during WM_CREATE. You can suppress this behavior by using style MC_PVS_NOPROPSETCREATE.

You can retrieve the underlying property set with MC_PVM_GETPROPSET or change it with MC_PVM_SETPROPSET.

These standard messages are handled by the control:

These standard notifications are sent by the control:

Macro Definition Documentation

#define MC_WC_PROPVIEWW   L"mCtrl.propView"

Window class name (unicode variant).

#define MC_WC_PROPVIEWA   "mCtrl.propView"

Window class name (ANSI variant).

#define MC_PVS_NOPROPSETCREATE   0x0001

Do not automatically create empty property set.

#define MC_PVS_SORTITEMS   0x0002

Sort items alphabetically.

This applies only when the control creates new property set.

#define MC_PVM_GETPROPSET   (MC_PVM_FIRST + 0)

Gets handle of the underlying property set.

Parameters
wParamReserved, set to zero.
lParamReserved, set to zero.
Returns
(MC_HPROPSET) Handle of the property set.
#define MC_PVM_SETPROPSET   (MC_PVM_FIRST + 1)

Installs another property set into the control.

Note the control releases a reference of the previously installed property and references the newly installed property set.

Unless the control has style MC_PVS_NOPROPSETCREATE, the control will create and install new empty property set if lParam is NULL.

Parameters
wParamReserved, set to zero.
[in]lParam(MC_HPROPSET) Handle of the property set.
Returns
(BOOL) TRUE on success, FALSE on failure.
#define MC_PVM_INSERTITEMW   (MC_PVM_FIRST + 2)

Inserts an item into the underlying property set (unicode variant).

Parameters
wParamReserved, set to to zero.
[in]lParam(MC_PROPSETITEMW) The item.
Returns
(int) Index of the item, or -1 on failure.
#define MC_PVM_INSERTITEMA   (MC_PVM_FIRST + 3)

Inserts an item into the underlying property set (ANSI variant).

Parameters
wParamReserved, set to to zero.
[in]lParam(MC_PROPSETITEMA) The item.
Returns
(int) Index of the item, or -1 on failure.
#define MC_PVM_SETITEMW   (MC_PVM_FIRST + 4)

Sets an item in the underlying property set (unicode variant).

Parameters
wParamReserved, set to to zero.
[in]lParam(MC_PROPSETITEMW) The item.
Returns
(int) Index of the item, or -1 on failure.
#define MC_PVM_SETITEMA   (MC_PVM_FIRST + 5)

Sets an item in the underlying property set (ANSI variant).

Parameters
wParamReserved, set to to zero.
[in]lParam(MC_PROPSETITEMA) The item.
Returns
(int) Index of the item, or -1 on failure.
#define MC_PVM_GETITEMW   (MC_PVM_FIRST + 6)

Gets an item from the underlying property set (unicode variant).

Application has to set MC_PROPSETITEM::dwMask prior sending the message to indicate what attributes of the item to retrieve. If the application uses MC_PSIMF_TEXT, then it also has to set MC_PROPSETITEM::pszText to point to a buffer where the text will be stored and set MC_PROPSETITEM::cchTextMax to specify size of the buffer.

Parameters
wParamReserved, set to to zero.
[out]lParam(MC_PROPSETITEMW) The item.
Returns
(BOOL) TRUE on success, FALSE on failure.
#define MC_PVM_GETITEMA   (MC_PVM_FIRST + 7)

Gets an item from the underlying property set (ANSI variant).

Application has to set MC_PROPSETITEM::dwMask prior sending the message to indicate what attributes of the item to retrieve. If the application uses MC_PSIMF_TEXT, then it also has to set MC_PROPSETITEM::pszText to point to a buffer where the text will be stored and set MC_PROPSETITEM::cchTextMax to specify size of the buffer.

Parameters
wParamReserved, set to to zero.
[out]lParam(MC_PROPSETITEMA) The item.
Returns
(BOOL) TRUE on success, FALSE on failure.
#define MC_PVM_DELETEITEM   (MC_PVM_FIRST + 8)

Delete an item from the underlying property set.

Parameters
[in]wParamIndex of the item.
lParamReserved, set to zero.
Returns
(BOOL) TRUE on success, FALSE on failure.
#define MC_PVM_DELETEALLITEMS   (MC_PVM_FIRST + 9)

Delete all items from the underlying property set.

Parameters
wParamReserved, set to zero.
lParamReserved, set to zero.
Returns
(BOOL) TRUE on success, FALSE on failure.
#define MC_PVM_GETITEMCOUNT   (MC_PVM_FIRST + 10)

Gets count of items in the underlying property set.

Parameters
wParamReserved, set to zero.
lParamReserved, set to zero.
Returns
(int) Count of items, or -1 on failure.
#define MC_WC_PROPVIEW   MCTRL_NAME_AW(MC_WC_PROPVIEW)

Unicode-resolution alias.

See Also
MC_WC_PROPVIEWW MC_WC_PROPVIEWA
#define MC_PVITEM   MCTRL_NAME_AW(MC_PVITEM)

Unicode-resolution alias.

See Also
MC_PVITEMW MC_PVITEMA
#define MC_PVM_INSERTITEM   MCTRL_NAME_AW(MC_PVM_INSERTITEM)

Unicode-resolution alias.

See Also
MC_PVM_INSERTITEMW MC_PVM_INSERTITEMA
#define MC_PVM_SETITEM   MCTRL_NAME_AW(MC_PVM_SETITEM)

Unicode-resolution alias.

See Also
MC_PVM_SETITEMW MC_PVM_SETITEMA
#define MC_PVM_GETITEM   MCTRL_NAME_AW(MC_PVM_GETITEM)

Unicode-resolution alias.

See Also
MC_PVM_GETITEMW MC_PVM_GETITEMA

Function Documentation

BOOL mcPropView_Initialize ( void  )

Registers window class of the control.

Returns
TRUE on success, FALSE on failure.
void mcPropView_Terminate ( void  )

Unregisters window class of the control.