📄 compstui.h
字号:
typedef struct _OIEXT {
WORD cbSize;
WORD Flags;
HINSTANCE hInstCaller;
LPTSTR pHelpFile;
ULONG_PTR dwReserved[4];
} OIEXT, *POIEXT;
//
// OIEXT is a data structure used as extension to the OPTITEM data structure
//
//
// cbSize - sizeof this structure
//
// Flags - One or more of OIEXTF_xxxx may be specified.
//
// OIEXTF_ANSI_STRING
//
// Specified that LPTSTR in this data structure is a ansi
// string (not UNICODE). This bit only checked if the
// LPTSTR is not the resource string ID
//
// hInstCaller - DLL instance handle, when this hInst is not NULL then all
// resource string and icon loading for this OPTITEM and its
// OPTTYPE, OPTPARAM are loaded from this hInstCaller Handle.
// If this filed is NULL then it will use the hInstCaller handle
// specified in the COMPROPSHEETUI data structure
//
// pHelpFile - Resource string ID or pointer to the help file for this
// OPTITEM. If this pointer is NULL then help file for the
// help index is assume specified in the pHelpFile field in the
// COMPROPSHEETUI data structure.
//
// dwReserved - These fields are not used now, and must 0
//
typedef struct _OPTITEM {
WORD cbSize; // size of this structure
BYTE Level; // level in the tree view
BYTE DlgPageIdx; // Index to the pDlgPage
DWORD Flags; // OPTIF_xxxx flags
ULONG_PTR UserData; // caller's own data
LPTSTR pName; // name of the item
union {
LONG Sel; // current selection (index)
LPTSTR pSel; // current selection (pStr)
} DUMMYUNIONNAME;
union {
PEXTCHKBOX pExtChkBox; // Pointer to EXTCHKBOX structure
PEXTPUSH pExtPush; // Pointer to EXTPUSH
} DUMMYUNIONNAME2;
POPTTYPE pOptType; // pointer to OPTTYPE structure
DWORD HelpIndex; // Help file index
BYTE DMPubID; // Devmode public filed ID
BYTE UserItemID; // caller's own item ID
WORD wReserved; // reserved WORD field, must be 0
POIEXT pOIExt; // Optitem extension pointer
ULONG_PTR dwReserved[3]; // reserved DWORD fields (must be 0)
} OPTITEM, *POPTITEM;
//
// OPTITEM is to describe each treeview item's name, selection type and
// possible selection
//
// cbSize - sizeof this structure
//
// Level - The level in the treeview, the root should have lowest
// number and number should start with level 0. the maximum
// number of levels are 256.
//
// DlgPageIdx - Zero-based index to the DLGPAGE araay pointee by
// pDlgPage. The Maximum index is MAX_DLGPPAGE_COUNT, if
// pDlgPage is a standard CPSUI_PDLGPAGE_xxxx then this
// field is automatically set the common UI
//
// Flags - OPTIF_xxxx flags as describe above
//
// OPTIF_COLLAPSE
//
// Collaspe treeview item and its children so it is
// not expanded initially.
//
//
// OPTIF_HIDE
//
// Hide this item from the treeview
//
//
// OPTIF_CALLBACK
//
// Callback to the caller when user making some
// changes a pointer (pfnCallBack) must provided and
// process as defined by the common UI.
//
//
// OPTIF_CHANGED
//
// This item was changed and need to re-display. this
// flag only used when caller returned from callback
// funciton.
//
//
// OPTIF_CHANGEONCE
//
// This item has been changed at least once.
//
//
// OPTIF_DISABLED
//
// Disable this item so it become not selectable.
//
//
// OPTIF_ECB_CHECKED
//
// Specified the associated extended check box is
// in checked state.
//
//
// OPTIF_EXT_HIDE
//
// Hide the extended check box/extended push botton.
//
//
// OPTIF_EXT_DISABLED
//
// The Extended check box/push botton is disabled and
// not selectable
//
//
// OPTIF_SEL_AS_HICON
//
// This flag only used if this item has no type,
// pOptType=NULL that is, when pOptType is NULL then
// 'Sel' field is the IconID. if flag is set then it
// indicate 'pSel' is the Icon handle rather
// than the icon resource ID specified in Sel.
//
//
// OPTIF_EXT_IS_EXTPUSH
//
// Specified that pExtPush should be used when this
// pointer is not NULL, if this pointer is not NULL
// and this flag is clear then pExtChkBox is assumed.
//
//
// OPTIF_NO_GROUPBOX_NAME
//
// Specified that do not overwrite the group box title
// text, if group box ID is defined. See the TVOT_xx
// description above.
//
//
// OPTIF_OVERLAY_WARNING_ICON
//
// If this bit is set then this header OPTITEM's icon
// will be overlaied by a common UI's
// IDI_CPSUI_WARNING icon. This bit only used if this
// item has no type, pOptType is NULL that is.
//
//
// OPTIF_OVERLAY_STOP_ICON
//
// If this bit is set then this header OPTITEM's icon
// will be overlaied by a common UI's IDI_CPSUI_STOP
// icon. This bit only used if this item has no type,
// pOptType is NULL that is.
//
//
// OPTIF_OVERLAY_NO_ICON
//
// If this bit is set then this header OPTITEM's icon
// will be overlaied by a common UI's IDI_CPSUI_NO
// icon. This bit only used if this item has no type,
// pOptType is NULL that is.
//
//
// OPTIF_INITIAL_TVITEM
//
// Specified that this item will be the initial item
// to be selected and display on the treeview page.
// If the selected item is currently a child or
// collapse then common UI will expand the selection
// then scroll it into view.
//
// If this flag is clear or the set item is in hide
// status common UI will pick the initial item to
// display.
//
// OPTIF_HAS_POIEXT
//
// Specified that pOIExt field is a valid pointer that
// points to OIEXT data structure. The pOIExt only
// used by the common UI if this bit is set.
//
//
// UserData - a 32-bit number used by the caller and common UI will not
// modify it.
//
// pName - Pointer to the item's name, such as 'Upper Tray',
// 'Memory' or it is used as data as describe in
// OPTPARAM/OPTTYPE structure
//
// ** See LPTSTR description above
//
// pSel
// Sel - Current selection for this item. This is a union field
// which can be a pointer to a string or a LONG index
// selection.
//
// ** If pOptType field is NULL then 'Sel' is the icon ID
// to be used for the header.
//
// pExtPush
// pExtChkBox - Pointer to either EXTPUSH or EXTCHKBOX data structure,
// if this pointer is NULL then this item does not have
// ectended check box/push botton associate with it.
//
// When an extended check box is associate with the
// OPTTYPE, the OPTIF_EXT_IS_EXTPUSH must not set, the
// OPTIF_ECB_CHECKED flag specified if the extended check
// box is checked or not checked.
//
// When an Extended push botton is associated with the
// OPTTYPE, the OPTIF_EXT_IS_EXTPUSH flag must set.
//
// The following flags are used in both EXTCHKBOX or
// EXTPUSH
//
// OPTIF_EXT_HIDE,
// OPTIF_EXT_DISABLED
// OPTIF_EXT_CHANGEONCE
//
//
// pOptType - Pointer to the OPTTYPE structure to describe the display
// and selections of the item. If this pointer is NULL
// then this this item does not have any selection. and it
// is used as sub-items' header.
//
// * When pOptType is NULL then the 'Sel' is the Icon ID.
//
//
// HelpIndex - a index to the help file for context sensitive help
// if HelpInex=0 then there is no help for this item
//
// DMPubID - specified if this item is one of the public fields in the
// DEVMODE structure and supported by the common UI.
//
// DMPUB_NONE - Not DEVMODE public fields
// DMPUB_ORIENTATION - dmOrientation
// DMPUB_SCALE - dmScale
// DMPUB_COPIES_COLLATE - dmCopies/dmCollate
// DMPUB_DEFSOURCE - dmDefSource
// DMPUB_PRINTQUALITY - dmPrintQuality
// DMPUB_COLOR - dmColor
// DMPUB_DUPLEX - dmDuplex
// DMPUB_TTOPTION - dmTTOption
// DMPUB_FORMNAME - dmFormName
// DMPUB_ICMMETHOD - dmICMMethod
// DMPUB_ICMINTENT - dmICMIntent
// DMPUB_MEDIATYPE - dmMediaType
// DMPUB_DITHERTYPE - dmDitherType
//
// ** for most of DMPUB_FIRST to DMPUB_LAST each OPTITEM's
// pName is automatically set to the standard
// IDS_CPSUI_xxx for the consistancy reason, the
// standard pName is set according to following table.
//
// DMPUB_ORIENTATION - IDS_CPSUI_ORIENTATION
// DMPUB_SCALE - IDS_CPSUI_SCALING
// DMPUB_COPIES_COLLATE - IDS_CPSUI_COPIES
// DMPUB_DEFSOURCE - IDS_CPSUI_SOURCE
// DMPUB_PRINTQUALITY - IDS_CPSUI_PRINTQUALITY
// IDS_CPSUI_RESOLUTION
// DMPUB_COLOR - IDS_CPSUI_COLOR_APPERANCE
// DMPUB_DUPLEX - IDS_CPSUI_DUPLEX
// DMPUB_TTOPTION - IDS_CPSUI_TTOPTION
// DMPUB_FORMNAME - IDS_CPSUI_FORMNAME
// DMPUB_ICMMETHOD - IDS_CPSUI_ICMMETHOD
// DMPUB_ICMINTENT - IDS_CPSUI_ICMINTENT
// DMPUB_MEDIATYPE - IDS_CPSUI_MEDIA
// DMPUB_DITHERTYPE - IDS_CPSUI_DITHERING
//
// for DMPUB_PRINTQUALITY, if the pName is not one of
// IDS_CPSUI_PRINTQUALITY or IDS_CPSUI_RESOLUTION then
// common UI will automatically default the pName to
// IDS_CPSUI_RESOLUTION.
//
// Each pData (OPTPARAM) selection in OPTPARAM which
// OPTITEM's pOptType pointed to should use as much
// as IDS_CPSUI_xxx standard name as possible.
//
//
// ** for DMPUB_COPIES_COLLATE the common UI automatically
// doing the following before the callback
//
// 1) Enable/Disable the collate extended check box if
// OPTIF_EXT_HIDE is not specified and pExtChkBox
// is not NULL in the OPTITEM.
//
// 2) Automatically change the postfix for this item
// to be 'Copy' if selection is one, and 'Copies'
// if selection is greater than one in the treeview
// page, and it will also set the postfix in
// standard document property page if the postfix
// ID is provided (BegCtrlID + 4)
//
//
// ** for DMPUB_COLOR the common UI automatically doing
// the following before the callback, the gray
// selection must be Sel=0 and Color slection must be
// Sel=1
//
// 1) Calling halftone color adjustment with current
// color/mono selection
//
// 2) Disable ICM when color is not selected
//
//
// ** Please see above DMPUB_xx description for details.
//
// UserItemID
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -