📄 penwin.h
字号:
#define RCO_NOFLASHCURSOR 0x00000800L // no cursor feedback
#define RCO_BOXCROSS 0x00001000L // show + at boxedit center
#define RCO_COLDRECOG 0x00008000L // result is from cold recog
#define RCO_SAVEBACKGROUND 0x00010000L // Save background from ink
#define RCO_DODEFAULT 0x00020000L // do default gesture processing
// RC Orientation of Tablet:
#define RCOR_NORMAL 1 // tablet not rotated
#define RCOR_RIGHT 2 // rotated 90 deg anticlockwise
#define RCOR_UPSIDEDOWN 3 // rotated 180 deg
#define RCOR_LEFT 4 // rotated 90 deg clockwise
// RC Preferences:
#define RCP_LEFTHAND 0x0001 // left handed input
#define RCP_MAPCHAR 0x0004 // fill in syg.lpsyc (ink) for training
// RCRESULT wResultsType values:
#define RCRT_DEFAULT 0x0000 // normal ret
#define RCRT_UNIDENTIFIED 0x0001 // result contains unidentified results
#define RCRT_GESTURE 0x0002 // result is a gesture
#define RCRT_NOSYMBOLMATCH 0x0004 // nothing recognized (no ink match)
#define RCRT_PRIVATE 0x4000 // recognizer-specific symbol
#define RCRT_NORECOG 0x8000 // no recog attempted, only data ret
#define RCRT_ALREADYPROCESSED 0x0008 // GestMgr hooked it
#define RCRT_GESTURETRANSLATED 0x0010 // GestMgr translated it to ANSI value
#define RCRT_GESTURETOKEYS 0x0020 // ditto to set of virtual keys
// RC Result Return Mode specification:
#define RRM_STROKE 0 // return results after each stroke
#define RRM_SYMBOL 1 // per symbol (e.g. boxed edits)
#define RRM_WORD 2 // on recog of a word
#define RRM_NEWLINE 3 // on recog of a line break
#define RRM_COMPLETE 16 // on PCM_xx specified completion
// SetGlobalRC() API return code flags:
#define SGRC_OK 0x0000 // no err
#define SGRC_USER 0x0001 // invalid User name
#define SGRC_PARAMERROR 0x0002 // param error: call ignored
#define SGRC_RC 0x0004 // supplied RC has errors
#define SGRC_RECOGNIZER 0x0008 // DefRecog name invalid
#define SGRC_DICTIONARY 0x0010 // lpDefDict path invalid
#define SGRC_INIFILE 0x0020 // error saving to penwin.ini
#define SGRC_NA 0x8000 // function not available
#endif /*!NOPENRC1 */
//---------------------------------------------------------------------------
#ifndef NOPENTARGET
#define TPT_CLOSEST 0x0001 // Assign to the closest target
#define TPT_INTERSECTINK 0x0002 // target with intersecting ink
#define TPT_TEXTUAL 0x0004 // apply textual heuristics
#define TPT_DEFAULT (TPT_TEXTUAL | TPT_INTERSECTINK | TPT_CLOSEST)
#endif /*!NOPENTARGET */
//---------------------------------------------------------------------------
#ifndef NOPENVIRTEVENT
// Virtual Event Layer:
#define VWM_MOUSEMOVE 0x0001
#define VWM_MOUSELEFTDOWN 0x0002
#define VWM_MOUSELEFTUP 0x0004
#define VWM_MOUSERIGHTDOWN 0x0008
#define VWM_MOUSERIGHTUP 0x0010
#endif /*!NOPENVIRTEVENT */
#endif /* RC_INVOKED */ // ... all the way back from definitions:2
/****** Messages and Defines ************************************************/
// Windows Messages WM_PENWINFIRST (0x0380) and WM_PENWINLAST (0x038F)
// are defined in WINDOWS.H and WINMIN.H
//---------------------------------------------------------------------------
#ifndef NOPENMSGS
#ifndef NOPENRC1 // not available in WIN32
#define WM_RCRESULT (WM_PENWINFIRST+1) // 0x381
#define WM_HOOKRCRESULT (WM_PENWINFIRST+2) // 0x382
#endif /*!NOPENRC1*/
#define WM_PENMISCINFO (WM_PENWINFIRST+3) // 0x383
#define WM_GLOBALRCCHANGE (WM_PENWINFIRST+3) // alias
#ifndef NOPENAPPS // not available in WIN32
#define WM_SKB (WM_PENWINFIRST+4) // 0x384
#endif /*!NOPENAPPS */
#define WM_PENCTL (WM_PENWINFIRST+5) // 0x385
#define WM_HEDITCTL (WM_PENWINFIRST+5) // FBC: alias
// WM_HEDITCTL (WM_PENCTL) wParam options:
#ifndef _WIN32
#define HE_GETRC 3 // FBC: get RC from HEDIT/BEDIT control
#define HE_SETRC 4 // FBC: ditto set
#define HE_GETINFLATE 5 // FBC: get inflate rect
#define HE_SETINFLATE 6 // FBC: ditto set
#endif //!_WIN32
#define HE_GETUNDERLINE 7 // get underline mode
#define HE_SETUNDERLINE 8 // ditto set
#define HE_GETINKHANDLE 9 // get handle to captured ink
#define HE_SETINKMODE 10 // begin HEDIT cold recog mode
#define HE_STOPINKMODE 11 // end cold recog mode
#ifndef _WIN32
#define HE_GETRCRESULTCODE 12 // FBC: result of recog after HN_ENDREC
#endif //!_WIN32
#define HE_DEFAULTFONT 13 // switch BEDIT to def font
#define HE_CHARPOSITION 14 // BEDIT byte offset -> char position
#define HE_CHAROFFSET 15 // BEDIT char position -> byte offset
#define HE_GETBOXLAYOUT 20 // get BEDIT layout
#define HE_SETBOXLAYOUT 21 // ditto set
#ifndef _WIN32
#define HE_GETRCRESULT 22 // FBC: get RCRESULT after HN_RCRESULT
#define HE_KKCONVERT 30 // JPN start kana-kanji conversion
#define HE_GETKKCONVERT 31 // JPN get KK state
#define HE_CANCELKKCONVERT 32 // JPN cancel KK conversion
#define HE_FIXKKCONVERT 33 // JPN force KK result
#define HE_GETKKSTATUS 34 // JPN get KK UI state
#define HE_KKNOCONVERT 35 // JPN revert conversion
#define HE_SETIMEDEFAULT 36 // JPN set a range of DCS
#define HE_GETIMEDEFAULT 37 // JPN get a range of DCS
#endif //!_WIN32
#define HE_ENABLEALTLIST 40 // en/disable dropdown recog alt's
#define HE_SHOWALTLIST 41 // show dropdown (assume enabled)
#define HE_HIDEALTLIST 42 // hide dropdown alternatives
#define HE_GETLENSTYPE 43 // get lens type: CWR_ and CWRK_ flags
#define HE_SETLENSTYPE 44 // set lens type: CWR_ and CWRK_ flags
//------------------------------
// JPN Kana-to-Kanji conversion subfunctions:
#define HEKK_DEFAULT 0 // def
#define HEKK_CONVERT 1 // convert in place
#define HEKK_CANDIDATE 2 // start conversion dialog
#define HEKK_DBCSCHAR 3 // convert to DBCS
#define HEKK_SBCSCHAR 4 // convert to SBCS
#define HEKK_HIRAGANA 5 // convert to hiragana
#define HEKK_KATAKANA 6 // convert to katakana
//------------------------------
// JPN Return value of HE_GETKKSTATUS
#define HEKKR_PRECONVERT 1 // in pre conversion mode
#define HEKKR_CONVERT 2 // in mid conversion mode
#define HEKKR_TEMPCONFIRM 3 // in post conversion mode
// HE_STOPINKMODE (stop cold recog) options:
#define HEP_NORECOG 0 // don't recog ink
#define HEP_RECOG 1 // recog ink
#define HEP_WAITFORTAP 2 // recog after tap in window
// WM_PENCTL notifications:
#define HN_ENDREC 4 // recog complete
#define HN_DELAYEDRECOGFAIL 5 // HE_STOPINKMODE (cold recog) failed
#define HN_RESULT 20 // HEDIT/BEDIT has received new ink/recognition result
#ifndef _WIN32
#define HN_RCRESULT HN_RESULT
#endif //!_WIN32
#define HN_ENDKKCONVERT 30 // JPN KK conversion complete
#define HN_BEGINDIALOG 40 // Lens/EditText/garbage detection dialog
// is about to come up on this hedit/bedit
#define HN_ENDDIALOG 41 // Lens/EditText/garbage detection dialog
// has just been destroyed
//------------------------------
#ifndef NOPENIEDIT
// Messages common with other controls:
#define IE_GETMODIFY (EM_GETMODIFY) // gets the mod'n (dirty) bit
#define IE_SETMODIFY (EM_SETMODIFY) // sets the mod'n (dirty) bit
#define IE_CANUNDO (EM_CANUNDO) // queries whether can undo
#define IE_UNDO (EM_UNDO) // undo
#define IE_EMPTYUNDOBUFFER (EM_EMPTYUNDOBUFFER) // clears IEDIT undo buffer
#define IE_MSGFIRST (WM_USER+150) // 0x496 == 1174
// IEdit common messages:
#define IE_GETINK (IE_MSGFIRST+0) // gets ink from the control
#define IE_SETINK (IE_MSGFIRST+1) // sets ink into the control
#define IE_GETPENTIP (IE_MSGFIRST+2) // gets the cur def ink pentip
#define IE_SETPENTIP (IE_MSGFIRST+3) // sets the cur def ink pentip
#define IE_GETERASERTIP (IE_MSGFIRST+4) // gets the cur eraser pentip
#define IE_SETERASERTIP (IE_MSGFIRST+5) // sets the cur eraser pentip
#define IE_GETBKGND (IE_MSGFIRST+6) // gets the bkgnd options
#define IE_SETBKGND (IE_MSGFIRST+7) // sets the bkgnd options
#define IE_GETGRIDORIGIN (IE_MSGFIRST+8) // gets the bkgnd grid origin
#define IE_SETGRIDORIGIN (IE_MSGFIRST+9) // sets the bkgnd grid origin
#define IE_GETGRIDPEN (IE_MSGFIRST+10) // gets the bkgnd grid pen
#define IE_SETGRIDPEN (IE_MSGFIRST+11) // sets the bkgnd grid pen
#define IE_GETGRIDSIZE (IE_MSGFIRST+12) // gets the bkgnd grid size
#define IE_SETGRIDSIZE (IE_MSGFIRST+13) // sets the bkgnd grid size
#define IE_GETMODE (IE_MSGFIRST+14) // gets the current pen mode
#define IE_SETMODE (IE_MSGFIRST+15) // sets the current pen mode
#define IE_GETINKRECT (IE_MSGFIRST+16) // gets the rectbound of the ink
// IEdit-specific messages:
#define IE_GETAPPDATA (IE_MSGFIRST+34) // gets the user-defined datum
#define IE_SETAPPDATA (IE_MSGFIRST+35) // sets the user-defined data
#define IE_GETDRAWOPTS (IE_MSGFIRST+36) // gets the ink draw options
#define IE_SETDRAWOPTS (IE_MSGFIRST+37) // sets the ink options
#define IE_GETFORMAT (IE_MSGFIRST+38) // gets format of stroke(s)
#define IE_SETFORMAT (IE_MSGFIRST+39) // sets format of stroke(s)
#define IE_GETINKINPUT (IE_MSGFIRST+40) // gets the ink input option
#define IE_SETINKINPUT (IE_MSGFIRST+41) // sets the ink input option
#define IE_GETNOTIFY (IE_MSGFIRST+42) // gets the notification bits
#define IE_SETNOTIFY (IE_MSGFIRST+43) // sets the notification bits
#define IE_GETRECOG (IE_MSGFIRST+44) // gets recognition options
#define IE_SETRECOG (IE_MSGFIRST+45) // sets recognition options
#define IE_GETSECURITY (IE_MSGFIRST+46) // gets the security options
#define IE_SETSECURITY (IE_MSGFIRST+47) // sets the security options
#define IE_GETSEL (IE_MSGFIRST+48) // gets sel status of a stroke
#define IE_SETSEL (IE_MSGFIRST+49) // sets sel status of a stroke
#define IE_DOCOMMAND (IE_MSGFIRST+50) // send command to IEdit
#define IE_GETCOMMAND (IE_MSGFIRST+51) // gets user command
#define IE_GETCOUNT (IE_MSGFIRST+52) // gets count of strks in I-Edit
#define IE_GETGESTURE (IE_MSGFIRST+53) // gets details on user gesture
#define IE_GETMENU (IE_MSGFIRST+54) // gets handle to pop-up menu
#define IE_GETPAINTDC (IE_MSGFIRST+55) // gets the HDC for painting
#define IE_GETPDEVENT (IE_MSGFIRST+56) // gets details of last pd event
#define IE_GETSELCOUNT (IE_MSGFIRST+57) // gets count of selected strks
#define IE_GETSELITEMS (IE_MSGFIRST+58) // gets indices of all sel strks
#define IE_GETSTYLE (IE_MSGFIRST+59) // gets IEdit control styles
#endif /*!NOPENIEDIT */
//------------------------------
#ifndef NOPENHEDIT
// (H)Edit Control:
// CTLINITHEDIT.dwFlags values
#define CIH_NOGDMSG 0x0001 // disable garbage detection message box for this edit
#define CIH_NOACTIONHANDLE 0x0002 // disable action handles for this edit
#define CIH_NOEDITTEXT 0x0004 // disable Lens/Edit/Insert text for this edit
#define CIH_NOFLASHCURSOR 0x0008 // don't flash cursor on tap-n-hold in this (h)edit
#endif /* !NOPENHEDIT */
//------------------------------
#ifndef NOPENBEDIT
// Boxed Edit Control:
// box edit alternative list:
#define HEAL_DEFAULT -1L // AltList def value for lParam
// box edit Info:
#define BEI_FACESIZE 32 // max size of font name, = LF_FACESIZE
#define BEIF_BOXCROSS 0x0001
// box edit size:
#define BESC_DEFAULT 0
#define BESC_ROMANFIXED 1
#define BESC_KANJIFIXED 2
#define BESC_USERDEFINED 3
// CTLINITBEDIT.wFlags values
#define CIB_NOGDMSG 0x0001 // disable garbage detection message box for this bedit
#define CIB_NOACTIONHANDLE 0x0002 // disable action handles for this bedit
#define CIB_NOFLASHCURSOR 0x0004 // don't flash cursor on tap-n-hold in this bedit
#ifdef JAPAN
#define CIB_NOWRITING 0x0010 // disallow pen input into control
#endif // JAPAN
#define BXD_CELLWIDTH 12
#define BXD_CELLHEIGHT 16
#define BXD_BASEHEIGHT 13
#define BXD_BASEHORZ 0
#define BXD_MIDFROMBASE 0
#define BXD_CUSPHEIGHT 2
#define BXD_ENDCUSPHEIGHT 4
#define BXDK_CELLWIDTH 32
#define BXDK
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -