📄 penwin.h
字号:
#define IES_HSCROLL 0x0002 // ctl is horizontally scrollable
#define IES_VSCROLL 0x0004 // ctl is vertically scrollable
#define IES_OWNERDRAW 0x0008 // ctl will be drawn by parent window
#endif /*!NOPENIEDIT */
#ifndef RC_INVOKED // ... rest of file of no interest to rc compiler
//////////////////////////////////////////////////////////////////////////////
/****** Definitions 2: RC compiler excluded ********************************/
//---------------------------------------------------------------------------
#ifndef NOPENDATA
// PenData API constants:
// ANIMATEINFO callback options:
#define AI_CBSTROKE 0xFFFF // Animate callback after every stroke
// ANIMATEINFO options:
#define AI_SKIPUPSTROKES 0x0001 // ignore upstrokes in animation
// CompressPenData() API options:
#define CMPD_COMPRESS 0x0001
#define CMPD_DECOMPRESS 0x0002
// CreatePenDataRegion types:
#define CPDR_BOX 1 // bounding box
#define CPDR_LASSO 2 // lasso
// CreatePenData (CPD) and Pen Hardware (PHW) Flags;
// The order of PHW flags is important:
#define CPD_DEFAULT 0x047F // CPD_TIME | PHW_ALL
#define CPD_USERBYTE 0x0100 // alloc 8 bits/stroke
#define CPD_USERWORD 0x0200 // alloc 16 bits/stroke
#define CPD_USERDWORD 0x0300 // alloc 32 bits/stroke
#define CPD_TIME 0x0400 // maintain abs time info per stroke
// DrawPenDataEx() flags/options:
#define DPD_HDCPEN 0x0001 // use pen selected in HDC
#define DPD_DRAWSEL 0x0002 // draw the selection
// ExtractPenDataPoints options (EPDP_xx):
#define EPDP_REMOVE 0x0001 // Remove points from the pendata
// ExtractPenDataStrokes options and modifiers (EPDS_xx):
#define EPDS_SELECT 1 // selected strokes
#define EPDS_STROKEINDEX 2 // index
#define EPDS_USER 3 // user-specific value
#define EPDS_PENTIP 4 // complete pentip
#define EPDS_TIPCOLOR 5 // pentip color
#define EPDS_TIPWIDTH 6 // pentip width
#define EPDS_TIPNIB 7 // pentip nib style
#define EPDS_INKSET 8 // inkset match
#define EPDS_EQ 0x0000 // default: same as
#define EPDS_LT 0x0010 // all strokes less than
#define EPDS_GT 0x0020 // all strokes greater than
#define EPDS_NOT 0x0040 // all strokes not matching
#define EPDS_NE 0x0040 // alias
#define EPDS_GTE 0x0050 // alias for NOT LT
#define EPDS_LTE 0x0060 // alias for NOT GT
#define EPDS_REMOVE 0x8000 // remove matching strokes from source
// GetPenDataAttributes options (GPA_xx):
#define GPA_MAXLEN 1 // length of longest stroke
#define GPA_POINTS 2 // total number of points
#define GPA_PDTS 3 // PDTS_xx bits
#define GPA_RATE 4 // get sampling rate
#define GPA_RECTBOUND 5 // bounding rect of all points
#define GPA_RECTBOUNDINK 6 // ditto, adj for fat ink
#define GPA_SIZE 7 // size of pendata in bytes
#define GPA_STROKES 8 // total number of strokes
#define GPA_TIME 9 // absolute time at creation of pendata
#define GPA_USER 10 // number of user bytes available: 0, 1, 2, 4
#define GPA_VERSION 11 // version number of pendata
// GetStrokeAttributes options (GSA_xx):
#define GSA_PENTIP 1 // get stroke pentip (color, width, nib)
#define GSA_PENTIPCLASS 2 // same as GSA_PENTIP
#define GSA_USER 3 // get stroke user value
#define GSA_USERCLASS 4 // get stroke's class user value
#define GSA_TIME 5 // get time of stroke
#define GSA_SIZE 6 // get size of stroke in points and bytes
#define GSA_SELECT 7 // get selection status of stroke
#define GSA_DOWN 8 // get up/down state of stroke
#define GSA_RECTBOUND 9 // get the bounding rectangle of the stroke
// GetStrokeTableAttributes options (GSA_xx):
#define GSA_PENTIPTABLE 10 // get table-indexed pentip
#define GSA_SIZETABLE 11 // get count of Stroke Class Table entries
#define GSA_USERTABLE 12 // get table-indexed user value
#ifndef IX_END
#define IX_END 0xFFFF // to or past last available index
#endif //!IX_END
// PenTip:
#define PENTIP_NIBDEFAULT ((BYTE)0) // default pen tip nib style
#define PENTIP_HEIGHTDEFAULT ((BYTE)0) // default pen tip nib height
#define PENTIP_OPAQUE ((BYTE)0xFF) // default opaque ink
#define PENTIP_HILITE ((BYTE)0x80)
#define PENTIP_TRANSPARENT ((BYTE)0)
// General PenData API return values (PDR_xx):
#define PDR_NOHIT 3 // hit test failed
#define PDR_HIT 2 // hit test succeeded
#define PDR_OK 1 // success
#define PDR_CANCEL 0 // callback cancel or impasse
#define PDR_ERROR (-1) // parameter or unspecified error
#define PDR_PNDTERR (-2) // bad pendata
#define PDR_VERSIONERR (-3) // pendata version error
#define PDR_COMPRESSED (-4) // pendata is compressed
#define PDR_STRKINDEXERR (-5) // stroke index error
#define PDR_PNTINDEXERR (-6) // point index error
#define PDR_MEMERR (-7) // memory error
#define PDR_INKSETERR (-8) // bad inkset
#define PDR_ABORT (-9) // pendata has become invalid, e.g.
#define PDR_NA (-10) // option not available (pw kernel)
#define PDR_USERDATAERR (-16) // user data error
#define PDR_SCALINGERR (-17) // scale error
#define PDR_TIMESTAMPERR (-18) // timestamp error
#define PDR_OEMDATAERR (-19) // OEM data error
#define PDR_SCTERR (-20) // SCT error (full)
// PenData Scaling (PDTS):
#define PDTS_LOMETRIC 0 // 0.01mm
#define PDTS_HIMETRIC 1 // 0.001mm
#define PDTS_HIENGLISH 2 // 0.001"
#define PDTS_STANDARDSCALE 2 // PDTS_HIENGLISH alias
#define PDTS_DISPLAY 3 // display pixel
#define PDTS_ARBITRARY 4 // app-specific scaling
#define PDTS_SCALEMASK 0x000F // scaling values in low nibble
// CompactPenData() API trim options:
#define PDTT_DEFAULT 0x0000
#define PDTT_PENINFO 0x0100
#define PDTT_UPPOINTS 0x0200
#define PDTT_OEMDATA 0x0400
#define PDTT_COLLINEAR 0x0800
#define PDTT_COLINEAR 0x0800 // alt sp alias
#define PDTT_DECOMPRESS 0x4000 // decompress the data
#define PDTT_COMPRESS 0x8000
#define PDTT_ALL 0x0F00 // PENINFO|UPPOINTS|OEMDATA|COLLINEAR
#define PHW_NONE 0x0000 // no OEMdata
#define PHW_PRESSURE 0x0001 // report pressure in OEMdata if avail
#define PHW_HEIGHT 0x0002 // ditto height
#define PHW_ANGLEXY 0x0004 // ditto xy angle
#define PHW_ANGLEZ 0x0008 // ditto z angle
#define PHW_BARRELROTATION 0x0010 // ditto barrel rotation
#define PHW_OEMSPECIFIC 0x0020 // ditto OEM-specific value
#define PHW_PDK 0x0040 // report per-point PDK_xx in OEM data
#define PHW_ALL 0x007F // report everything
// compact pen data trim options: matches PDTT_values (see above)
#define PDTS_COMPRESS2NDDERIV 0x0010 // compress using 2nd deriv
#define PDTS_COMPRESSMETHOD 0x00F0 // sum of compress method flags
#define PDTS_NOPENINFO 0x0100 // removes PENINFO struct from header
#define PDTS_NOUPPOINTS 0x0200 // remove up pts
#define PDTS_NOOEMDATA 0x0400 // remove OEM data
#define PDTS_NOCOLLINEAR 0x0800 // remove successive identical pts
#define PDTS_NOCOLINEAR 0x0800 // alt sp alias
#define PDTS_NOTICK 0x1000 // remove timing info (2.0)
#define PDTS_NOUSER 0x2000 // remove user info (2.0)
#define PDTS_NOEMPTYSTROKES 0x4000 // remove empty strokes (2.0)
#define PDTS_COMPRESSED 0x8000 // perform lossless compression
// SetStrokeAttributes options (SSA_xx):
#define SSA_PENTIP 1 // set stroke tip (color, width, nib)
#define SSA_PENTIPCLASS 2 // set stroke's class pentip
#define SSA_USER 3 // set stroke user value
#define SSA_USERCLASS 4 // set stroke's class user value
#define SSA_TIME 5 // set time of stroke
#define SSA_SELECT 6 // set selection status of stroke
#define SSA_DOWN 7 // set up/down state of stroke
// SetStrokeTableAttributes options (SSA_xx):
#define SSA_PENTIPTABLE 8 // set table-indexed pentip
#define SSA_USERTABLE 9 // set table-indexed user value
// PenTip flag bits:
#define TIP_ERASECOLOR 1 // erase specific color pentip.rgb
// TrimPenData() API options:
#define TPD_RECALCSIZE 0x0000 // no trim, used for resize calc
#define TPD_USER 0x0080 // per-stroke user info
#define TPD_TIME 0x0100 // per-stroke timing info
#define TPD_UPPOINTS 0x0200 // x-y data up points
#define TPD_COLLINEAR 0x0400 // colinear and coincident points
#define TPD_COLINEAR 0x0400 // alt sp alias
#define TPD_PENINFO 0x0800 // PenInfo struct and all OEM
#define TPD_PHW 0x1000 // OEM & pdk except stroke tick or user
#define TPD_OEMDATA 0x1000 // ditto
#define TPD_EMPTYSTROKES 0x2000 // strokes with zero points
#define TPD_EVERYTHING 0x3FFF // everything (incl PHW_xx) except down pts
#endif /*!NOPENDATA */
//---------------------------------------------------------------------------
#ifndef NOPENDICT // not available in WIN32
// Dictionary:
#define cbDictPathMax 255
#define DIRQ_QUERY 1
#define DIRQ_DESCRIPTION 2
#define DIRQ_CONFIGURE 3
#define DIRQ_OPEN 4
#define DIRQ_CLOSE 5
#define DIRQ_SETWORDLISTS 6
#define DIRQ_STRING 7
#define DIRQ_SUGGEST 8
#define DIRQ_ADD 9
#define DIRQ_DELETE 10
#define DIRQ_FLUSH 11
#define DIRQ_RCCHANGE 12
#define DIRQ_SYMBOLGRAPH 13
#define DIRQ_INIT 14
#define DIRQ_CLEANUP 15
#define DIRQ_COPYRIGHT 16
#define DIRQ_USER 4096
#endif /*!NOPENDICT */
//---------------------------------------------------------------------------
#ifndef NOPENDRIVER
// Pen driver:
#define BITPENUP 0x8000
// Pen Driver messages:
#define DRV_SetPenDriverEntryPoints DRV_RESERVED+1
#define DRV_SetEntryPoints DRV_RESERVED+1 // alias
#define DRV_RemovePenDriverEntryPoints DRV_RESERVED+2
#define DRV_RemoveEntryPoints DRV_RESERVED+2 // alias
#define DRV_SetPenSamplingRate DRV_RESERVED+3
#define DRV_SetPenSamplingDist DRV_RESERVED+4
#define DRV_GetName DRV_RESERVED+5
#define DRV_GetVersion DRV_RESERVED+6
#define DRV_GetPenInfo DRV_RESERVED+7
#define DRV_PenPlayStart DRV_RESERVED+8
#define DRV_PenPlayBack DRV_RESERVED+9
#define DRV_PenPlayStop DRV_RESERVED+10
#define DRV_GetCalibration DRV_RESERVED+11
#define DRV_SetCalibration DRV_RESERVED+12
#define DRV_Reserved1 DRV_RESERVED+13
#define DRV_Reserved2 DRV_RESERVED+14
#define DRV_Query DRV_RESERVED+15
#define DRV_GetPenSamplingRate DRV_RESERVED+16
#define DRV_Calibrate DRV_RESERVED+17
// Pen Driver Playback constants:
#define PLAY_VERSION_10_DATA 0
#define PLAY_VERSION_20_DATA 1
// Pen Driver return values:
#define DRV_FAILURE 0x00000000
#define DRV_SUCCESS 0x00000001
#define DRV_BADPARAM1 0xFFFFFFFF
#define DRV_BADPARAM2 0xFFFFFFFE
#define DRV_BADSTRUCT 0xFFFFFFFD
// Pen Driver register messages flags:
#define PENREG_DEFAULT 0x00000002
#define PENREG_WILLHANDLEMOUSE 0x00000001
#define MAXOEMDATAWORDS 6 // rgwOemData[MAXOEMDATAWORDS]
// Pen Collection Mode termination conditions:
// (note update doc for PCMINFO struct if change these)
#define PCM_PENUP 0x00000001L // stop on penup
#define PCM_RANGE 0x00000002L // stop on leaving range
#define PCM_INVERT 0x00000020L // stop on tap of opposite end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -