mCtrl
0.9.0
|
Item set (data model for property view control) More...
Go to the source code of this file.
Data Structures | |
struct | MC_PROPSETITEMW |
Structure describing a single property (unicode variant). More... | |
struct | MC_PROPSETITEMA |
Structure describing a single property (ANSI variant). More... | |
Typedefs | |
typedef void * | MC_HPROPSET |
Opaque property set handle. | |
MC_PROPSETITEM::fMask Bits | |
#define | MC_PSIMF_TEXT (0x00000001) |
#define | MC_PSIMF_VALUE (0x00000002) |
#define | MC_PSIMF_LPARAM (0x00000004) |
#define | MC_PSIMF_FLAGS (0x00000008) |
Property set flags | |
#define | MC_PSF_SORTITEMS (0x00000004L) |
Sort items alphabetically. | |
Functions | |
MC_HPROPSET | mcPropSet_Create (DWORD dwFlags) |
Create new property set. | |
BOOL | mcPropSet_AddRef (MC_HPROPSET hPropSet) |
Increment reference counter of the property set. | |
BOOL | mcPropSet_Release (MC_HPROPSET hPropSet) |
Decrement reference counter of the property set. | |
int | mcPropSet_GetItemCount (MC_HPROPSET hPropSet) |
Get count of properties in the property set. | |
int | mcPropSet_InsertItemW (MC_HPROPSET hPropSet, MC_PROPSETITEMW *pItem) |
Insert new item into the property set (unicode variant). | |
int | mcPropSet_InsertItemA (MC_HPROPSET hPropSet, MC_PROPSETITEMA *pItem) |
Insert new item into the property set (ANSI variant). | |
BOOL | mcPropSet_GetItemW (MC_HPROPSET hPropSet, MC_PROPSETITEMW *pItem) |
Get some attributes of an item in the property set (unicode variant). | |
BOOL | mcPropSet_GetItemA (MC_HPROPSET hPropSet, MC_PROPSETITEMA *pItem) |
Get some attributes of an item in the property set (ANSI variant). | |
int | mcPropSet_SetItemW (MC_HPROPSET hPropSet, MC_PROPSETITEMW *pItem) |
Set some attributes of an item int the property set (unicode variant). | |
int | mcPropSet_SetItemA (MC_HPROPSET hPropSet, MC_PROPSETITEMA *pItem) |
Set some attributes of an item int the property set (ANSI variant). | |
BOOL | mcPropSet_DeleteItem (MC_HPROPSET hPropSet, int iItem) |
Delete an item from the proprty set. | |
BOOL | mcPropSet_DeleteAllItems (MC_HPROPSET hPropSet) |
Delete all items of the proprty set. | |
Unicode Resolution | |
#define | MC_PROPSETITEM MCTRL_NAME_AW(MC_PROPSETITEM) |
#define | mcPropSet_InsertItem MCTRL_NAME_AW(mcPropSet_InsertItem) |
#define | mcPropSet_SetItem MCTRL_NAME_AW(mcPropSet_SetItem) |
#define | mcPropSet_GetItem MCTRL_NAME_AW(mcPropSet_GetItem) |
Item set (data model for property view control)
The property set is a container of property items. It serves as a back-end for the property view control (MC_WC_PROPVIEW).
struct MC_PROPSETITEMW |
Structure describing a single property (unicode variant).
Before using the structure you have always have to set bits of the member fMask
to indicate what structure members are valid (on input) or expected (on output), and also set the member iItem
to determine an index of property in the set.
Data Fields | ||
---|---|---|
DWORD | fMask |
Bitmask specifying what members are valid. See MC_PSIMF_xxxx. |
int | iItem |
Index of the property. |
LPWSTR | pszText |
Text label of the property. |
int | cchTextMax |
Maximal number of characters in |
MC_HVALUE | hValue |
Handle of property value. |
LPARAM | lParam |
User data. |
DWORD | dwFlags |
Property flags. |
struct MC_PROPSETITEMA |
Structure describing a single property (ANSI variant).
Before using the structure you have always have to set bits of the member fMask
to indicate what structure members are valid (on input) or expected (on output), and also set the member iItem
to determine an index of property in the set.
Data Fields | ||
---|---|---|
DWORD | fMask |
Bitmask specifying what members are valid. See MC_PSIMF_xxxx. |
int | iItem |
Index of the property. |
LPSTR | pszText |
Text label of the property. |
int | cchTextMax |
Maximal number of characters in |
MC_HVALUE | hValue |
Handle of property value type. |
LPARAM | lParam |
User data. |
DWORD | dwFlags |
Property flags. |
#define MC_PSIMF_TEXT (0x00000001) |
MC_PROPSETITEMW::pszText and MC_PROPSETITEMW::cchTextMax, or MC_PROPSETITEMA::pszText and MC_PROPSETITEMA::cchTextMax are valid.
#define MC_PSIMF_VALUE (0x00000002) |
MC_PROPSETITEMW::hValue, or MC_PROPSETITEMA::hValue is valid.
#define MC_PSIMF_LPARAM (0x00000004) |
MC_PROPSETITEMW::lParam or MC_PROPSETITEMA::lParam is valid.
#define MC_PSIMF_FLAGS (0x00000008) |
MC_PROPSETITEMW::dwFlags or MC_PROPSETITEMA::dwFlags is valid.
#define MC_PSF_SORTITEMS (0x00000004L) |
Sort items alphabetically.
#define MC_PROPSETITEM MCTRL_NAME_AW(MC_PROPSETITEM) |
Unicode-resolution alias.
#define mcPropSet_InsertItem MCTRL_NAME_AW(mcPropSet_InsertItem) |
Unicode-resolution alias.
#define mcPropSet_SetItem MCTRL_NAME_AW(mcPropSet_SetItem) |
Unicode-resolution alias.
#define mcPropSet_GetItem MCTRL_NAME_AW(mcPropSet_GetItem) |
Unicode-resolution alias.
typedef void* MC_HPROPSET |
Opaque property set handle.
MC_HPROPSET mcPropSet_Create | ( | DWORD | dwFlags | ) |
Create new property set.
[in] | dwFlags | Flags of the new property set. |
NULL
if the function fails. BOOL mcPropSet_AddRef | ( | MC_HPROPSET | hPropSet | ) |
Increment reference counter of the property set.
[in] | hPropSet | The property set. |
TRUE
on success, FALSE
on failure. BOOL mcPropSet_Release | ( | MC_HPROPSET | hPropSet | ) |
Decrement reference counter of the property set.
If the reference counter drops to zero, all resources allocated for the property set are released.
[in] | hPropSet | The property set. |
TRUE
on success, FALSE
on failure. int mcPropSet_GetItemCount | ( | MC_HPROPSET | hPropSet | ) |
Get count of properties in the property set.
[in] | hPropSet | The property set. |
-1
on failure. int mcPropSet_InsertItemW | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMW * | pItem | ||
) |
Insert new item into the property set (unicode variant).
Note the item may be inserted to different position then requested with pItem->iItem
, if the property set was created with the flag MC_PSF_SORTITEMS
.
[in] | hPropSet | The property set. |
[in] | pItem | The item. |
-1
on failure. int mcPropSet_InsertItemA | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMA * | pItem | ||
) |
Insert new item into the property set (ANSI variant).
Note the item may be inserted to different position then requested with pItem->iItem
, if the property set was created with the flag MC_PSF_SORTITEMS
.
[in] | hPropSet | The property set. |
[in] | pItem | The item. |
-1
on failure. BOOL mcPropSet_GetItemW | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMW * | pItem | ||
) |
Get some attributes of an item in the property set (unicode variant).
Application has to set pItem->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 pItem->pszText
to point to a buffer where the text will be stored and set pItem->cchTextMax
to specify size of the buffer.
[in] | hPropSet | The property set. |
[out] | pItem | Item structure. |
TRUE
on success, FALSE
on failure. BOOL mcPropSet_GetItemA | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMA * | pItem | ||
) |
Get some attributes of an item in the property set (ANSI variant).
Application has to set pItem->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 pItem->pszText
to point to a buffer where the text will be stored and set pItem->cchTextMax
to specify size of the buffer.
[in] | hPropSet | The property set. |
[out] | pItem | Item structure to be filled. |
TRUE
on success, FALSE
on failure. int mcPropSet_SetItemW | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMW * | pItem | ||
) |
Set some attributes of an item int the property set (unicode variant).
Note that if the property set was created with the flag MC_PSF_SORTITEMS
then the item can be moved to a new position in the property set. You can detect this by examining the return value.
[in] | hPropSet | The property set. |
[in] | pItem | Item structure. |
-1
on failure. int mcPropSet_SetItemA | ( | MC_HPROPSET | hPropSet, |
MC_PROPSETITEMA * | pItem | ||
) |
Set some attributes of an item int the property set (ANSI variant).
Note that if the property set was created with the flag MC_PSF_SORTITEMS
then the item can be moved to a new position in the property set. You can detect this by examining the return value.
[in] | hPropSet | The property set. |
[in] | pItem | Item structure. |
-1
on failure. BOOL mcPropSet_DeleteItem | ( | MC_HPROPSET | hPropSet, |
int | iItem | ||
) |
Delete an item from the proprty set.
[in] | hPropSet | The property set. |
[in] | iItem | Index of the item. |
TRUE
on success, FALSE
on failure. BOOL mcPropSet_DeleteAllItems | ( | MC_HPROPSET | hPropSet | ) |
Delete all items of the proprty set.
[in] | hPropSet | The property set. |
TRUE
on success, FALSE
on failure.