SCOPEDATAITEM

[This is preliminary documentation and subject to change.]

The SCOPEDATAITEM structure specifies items to be inserted into the scope pane.

typedef struct _SCOPEDATAITEM
{
    DWORD  mask;
    LPOLESTR  displayname;
    int  nImage;
    int  nOpenImage;
    UINT  nState;
    int  cChildren;
    LPARAM  lParam;
    HSCOPEITEM  relativeID;
    HSCOPEITEM  ID;
} SCOPEDATAITEM;
typedef SCOPEDATAITEM* LPSCOPEDATAITEM; 

Members

mask
Specifies an array of flags that indicate which of the other structure members contain valid data. When this structure is used in the IConsoleNameSpace::GetItem, it indicates the item attributes to retrieve. This member can be one of the following:
Value Meaning
SDI_STR = 0x00002 The displayname member of the structure is valid or needs to be filled in.
SDI_IMAGE = 0x00004 The nImage member of the structure is valid or needs to be filled in.
SDI_OPENIMAGE = 0x00008 The nOpenImage member of the structure is valid or needs to be filled in.
SDI_STATE = 0x00010 The nState member of the structure is valid or needs to be filled in.
SDI_PARAM = 0x00020 The lParam member of the structure is valid or needs to be filled in.
SDI_CHILDREN = 0x00040 The cChildren member of the structure is valid or needs to be filled in.
SDI_PARENT = 0x00000000 Use only when inserting items into the scope pane. The relativeID member of the structure is the HSCOPEITEM of the parent. The item will be inserted as the last child of the item referred to by relativeID.
SDI_PREVIOUS = 0x10000000 Use only when inserting items into the scope pane. The relativeID member of the structure is the HSCOPEITEM of the previous sibling.
SDI_NEXT = 0x20000000 Use only when inserting items into the scope pane. The relativeID member of the structure is the HSCOPEITEM of the next sibling.
SDI_FIRST = 0x08000000 Use only when inserting items into the scope pane. The relativeID member of the structure is the HSCOPEITEM of the parent. The item will be inserted as the first child of the item referred to by relativeID.

displayname
Pointer to a null-terminated string that contains the item text if the structure specifies the SDI_STR item attribute. If this member is the MMC_CALLBACK value, the item is a callback item. When an item is being inserted (IConsoleName::InsertItem calls), this member must be MMC_CALBACK.
nImage
Virtual image index in the image list when the item is in the non-selected state. Note that the virtual image index is mapped internally to the actual index.
nOpenImage
Virtual image index in the image list when the item is in the selected state. Note that the virtual image index is mapped internally to the actual index. The node is like a folder in the Explorer. The icon is for an open folder.
nState
Specifies the state mask for the item. It can be zero or a combination of one or more of the following values:
Value Meaning
TVIS_BOLD The item is bold.
TVIS_CUT The item is selected as part of a cut-and-paste operation.
TVIS_DROPHILITED The item is selected as a drag-and-drop target.
TVIS_EXPANDED The item's list of child items is currently expanded; that is, the child items are visible. This value applies only to parent items.
TVIS_EXPANDEDONCE The item's list of child items has been expanded at least once. The TVN_ITEMEXPANDING and TVN_ITEMEXPANDED notification messages are not sent for parent items that have specified this value. This value applies only to parent items.
TVIS_SELECTED The item is selected. The appearance of a selected item depends on whether it has focus and on whether the system colors are used for selection.

cChildren
Specifies the number of enumerated nodes.
lParam
Specifies a user-supplied 32-bit value to associate with the item. This item, also called a cookie, is the value that is passed as the first parameter to IComponentData::QueryDataObject.
relativeID
A console-supplied unique item identifier. An item is inserted at a position relative to the item specified by this member. The relative position is determined by the mask settings.

To determine how relativeID is interpreted, specify one of the following constants as the mask member:

If the mask Member is: relativeID Values:
SDI_PARENT relativeID is the HSCOPEITEM of the parent. The item is inserted as the last child of the parent item. The value of SDI_PARENT indicates it is a no-op because, by default, relativeID is the parent item's ID.
SDI_PREVIOUS relativeID is the HSCOPEITEM of the previous sibling.
SDI_NEXT relativeID is the HSCOPEITEM of the next sibling.
SDI_FIRST Same as SDI_PARENT, except that the item is inserted as the first child.

ID
Specifies a console-supplied unique identifier for the scope-pane item. This member is used to identify an item in the scope pane by the IConsoleNameSpace methods, GetItem, SetItem, and DeleteItem.

See also

IComponentData, IComponentData::GetDisplayInfo, IConsoleNameSpace::GetItem, IConsoleNameSpace::InsertItem, IConsoleNameSpace::SetItem