⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pmwin.mh

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 MH
📖 第 1 页 / 共 5 页
字号:
#define FF_OWNERHIDDEN     0x0008
#define FF_DLGDISMISSED    0x0010
#define FF_OWNERDISABLED   0x0020
#define FF_SELECTED        0x0040
#define FF_NOACTIVATESWP   0x0080
#define FF_DIALOGBOX       0x0100

#define FI_FRAME           1
#define FI_OWNERHIDE       2
#define FI_ACTIVATEOK      4
#define FI_NOMOVEWITHOWNER 8

#define FID_SYSMENU      0x8002
#define FID_TITLEBAR     0x8003
#define FID_MINMAX       0x8004
#define FID_MENU         0x8005
#define FID_VERTSCROLL   0x8006
#define FID_HORZSCROLL   0x8007
#define FID_CLIENT       0x8008
#define FID_DBE_APPSTAT  0x8010
#define FID_DBE_KBDSTAT  0x8011
#define FID_DBE_PECIC    0x8012
#define FID_DBE_KKPOPUP  0x8013

#define SC_SIZE           0x8000
#define SC_MOVE           0x8001
#define SC_MINIMIZE       0x8002
#define SC_MAXIMIZE       0x8003
#define SC_CLOSE          0x8004
#define SC_NEXT           0x8005
#define SC_APPMENU        0x8006
#define SC_SYSMENU        0x8007
#define SC_RESTORE        0x8008
#define SC_NEXTFRAME      0x8009
#define SC_NEXTWINDOW     0x8010
#define SC_TASKMANAGER    0x8011
#define SC_HELPKEYS       0x8012
#define SC_HELPINDEX      0x8013
#define SC_HELPEXTENDED   0x8014
#define SC_SWITCHPANELIDS 0x8015
#define SC_DBE_FIRST      0x8018
#define SC_DBE_LAST       0x801F
#define SC_BEGINDRAG      0x8020
#define SC_ENDDRAG        0x8021
#define SC_SELECT         0x8022
#define SC_OPEN           0x8023
#define SC_CONTEXTMENU    0x8024
#define SC_CONTEXTHELP    0x8025
#define SC_TEXTEDIT       0x8026
#define SC_BEGINSELECT    0x8027
#define SC_ENDSELECT      0x8028
#define SC_WINDOW         0x8029
#define SC_HIDE           0x802a

#define WM_FLASHWINDOW        0x0040
#define WM_FORMATFRAME        0x0041
#define WM_UPDATEFRAME        0x0042
#define WM_FOCUSCHANGE        0x0043

#define WM_SETBORDERSIZE      0x0044
#define WM_TRACKFRAME         0x0045
#define WM_MINMAXFRAME        0x0046
#define WM_SETICON            0x0047
#define WM_QUERYICON          0x0048
#define WM_SETACCELTABLE      0x0049
#define WM_QUERYACCELTABLE    0x004a
#define WM_TRANSLATEACCEL     0x004b
#define WM_QUERYTRACKINFO     0x004c
#define WM_QUERYBORDERSIZE    0x004d
#define WM_NEXTMENU           0x004e
#define WM_ERASEBACKGROUND    0x004f
#define WM_QUERYFRAMEINFO     0x0050
#define WM_QUERYFOCUSCHAIN    0x0051
#define WM_OWNERPOSCHANGE     0x0052
#define WM_CALCFRAMERECT      0x0053

#define WM_WINDOWPOSCHANGED   0x0055
#define WM_ADJUSTFRAMEPOS     0x0056
#define WM_QUERYFRAMECTLCOUNT 0x0059

#define WM_QUERYHELPINFO      0x005B
#define WM_SETHELPINFO        0x005C
#define WM_ERROR              0x005D
#define WM_REALIZEPALETTE     0x005E

#pragma pack(2)

typedef LHANDLE HSAVEWP;

typedef struct _FRAMECDATA {
    USHORT cb;
    ULONG  flCreateFlags;
    USHORT hmodResources;
    USHORT idResources;
} FRAMECDATA, *PFRAMECDATA;

#pragma pack()

BOOL   APIENTRY WinCalcFrameRect(HWND,PRECTL,BOOL);
BOOL   APIENTRY WinCreateFrameControls(HWND,PFRAMECDATA,PCSZ);
HWND   APIENTRY WinCreateStdWindow(HWND,ULONG,PULONG,PCSZ,PCSZ,ULONG,HMODULE,ULONG,PHWND);
BOOL   APIENTRY WinFlashWindow(HWND,BOOL);
BOOL   APIENTRY WinGetMaxPosition(HWND,PSWP);
BOOL   APIENTRY WinGetMinPosition(HWND,PSWP,PPOINTL);
BOOL   APIENTRY WinSaveWindowPos(HSAVEWP,PSWP,ULONG);

#endif

#ifdef INCL_WINHELP
  #include <pmhelp.h>
#endif

#ifdef INCL_WINHOOKS

#define HK_SENDMSG          0
#define HK_INPUT            1
#define HK_MSGFILTER        2
#define HK_JOURNALRECORD    3
#define HK_JOURNALPLAYBACK  4
#define HK_HELP             5
#define HK_LOADER           6
#define HK_REGISTERUSERMSG  7
#define HK_MSGCONTROL       8
#define HK_PLIST_ENTRY      9
#define HK_PLIST_EXIT      10
#define HK_FINDWORD        11
#define HK_CODEPAGECHANGED 12
#define HK_CALLHOOK        13
#define HK_WINDOWDC        15
#define HK_DESTROYWINDOW   16
#define HK_CHECKMSGFILTER  20
#define HK_MSGINPUT        21
#define HK_LOCKUP          23
#define HK_FLUSHBUF        24

#define HMQ_CURRENT ((HMQ)1)

#define PM_MODEL_1X 0
#define PM_MODEL_2X 1

typedef struct _SMHSTRUCT {
    MPARAM mp2;
    MPARAM mp1;
    ULONG  msg;
    HWND   hwnd;
    ULONG  model;
} SMHSTRUCT, *PSMHSTRUCT;

BOOL   APIENTRY WinReleaseHook(HAB,HMQ,LONG,PFN,HMODULE);
BOOL   APIENTRY WinSetHook(HAB,HMQ,LONG,PFN,HMODULE);

#endif

#if defined(INCL_WININPUT) || !defined(INCL_NOCOMMON)

#define FC_NOSETFOCUS            0x0001
#define FC_NOBRINGTOTOP          FC_NOSETFOCUS
#define FC_NOLOSEFOCUS           0x0002
#define FC_NOBRINGTOPFIRSTWINDOW FC_NOLOSEFOCUS
#define FC_NOSETACTIVE           0x0004
#define FC_NOLOSEACTIVE          0x0008
#define FC_NOSETSELECTION        0x0010
#define FC_NOLOSESELECTION       0x0020

#define QFC_NEXTINCHAIN  1
#define QFC_ACTIVE       2
#define QFC_FRAME        3
#define QFC_SELECTACTIVE 4
#define QFC_PARTOFCHAIN  5

BOOL   APIENTRY WinFocusChange(HWND,HWND,ULONG);
BOOL   APIENTRY WinLockupSystem(HAB);
BOOL   APIENTRY WinSetFocus(HWND,HWND);
BOOL   APIENTRY WinUnlockSystem(HAB,PSZ);

#endif

#define WM_VRNDISABLED 0x007e
#define WM_VRNENABLED  0x007f

ULONG APIENTRY WinQueryVisibleRegion(HWND,HRGN);
BOOL  APIENTRY WinSetVisibleRegionNotify(HWND,BOOL);

#ifdef INCL_WININPUT

#define VK_BUTTON1   0x01
#define VK_BUTTON2   0x02
#define VK_BUTTON3   0x03
#define VK_BREAK     0x04
#define VK_BACKSPACE 0x05
#define VK_TAB       0x06
#define VK_BACKTAB   0x07
#define VK_NEWLINE   0x08
#define VK_SHIFT     0x09
#define VK_CTRL      0x0a
#define VK_ALT       0x0b
#define VK_ALTGRAF   0x0c
#define VK_PAUSE     0x0d
#define VK_CAPSLOCK  0x0e
#define VK_ESC       0x0f
#define VK_SPACE     0x10
#define VK_PAGEUP    0x11
#define VK_PAGEDOWN  0x12
#define VK_END       0x13
#define VK_HOME      0x14
#define VK_LEFT      0x15
#define VK_UP        0x16
#define VK_RIGHT     0x17
#define VK_DOWN      0x18
#define VK_PRINTSCRN 0x19
#define VK_INSERT    0x1a
#define VK_DELETE    0x1b
#define VK_SCRLLOCK  0x1c
#define VK_NUMLOCK   0x1d
#define VK_ENTER     0x1e
#define VK_SYSRQ     0x1f
#define VK_F1        0x20
#define VK_F2        0x21
#define VK_F3        0x22
#define VK_F4        0x23
#define VK_F5        0x24
#define VK_F6        0x25
#define VK_F7        0x26
#define VK_F8        0x27
#define VK_F9        0x28
#define VK_F10       0x29
#define VK_F11       0x2a
#define VK_F12       0x2b
#define VK_F13       0x2c
#define VK_F14       0x2d
#define VK_F15       0x2e
#define VK_F16       0x2f
#define VK_F17       0x30
#define VK_F18       0x31
#define VK_F19       0x32
#define VK_F20       0x33
#define VK_F21       0x34
#define VK_F22       0x35
#define VK_F23       0x36
#define VK_F24       0x37
#define VK_ENDDRAG   0x38
#define VK_CLEAR     0x39
#define VK_EREOF     0x3a
#define VK_PA1       0x3b
#define VK_ATTN      0x3c
#define VK_CRSEL     0x3d
#define VK_EXSEL     0x3e
#define VK_COPY      0x3f
#define VK_BLK1      0x40
#define VK_BLK2      0x41
#define VK_MENU      VK_F10
#define VK_USERFIRST 0x0100
#define VK_USERLAST  0x01ff

#ifdef INCL_NLS
  #define VK_DBCSFIRST  0x0080
  #define VK_DBCSLAST   0x00ff
  #define VK_BIDI_FIRST 0xe0
  #define VK_BIDI_LAST  0xff
#endif

#define KC_NONE        0x0000
#define KC_CHAR        0x0001
#define KC_VIRTUALKEY  0x0002
#define KC_SCANCODE    0x0004
#define KC_SHIFT       0x0008
#define KC_CTRL        0x0010
#define KC_ALT         0x0020
#define KC_KEYUP       0x0040
#define KC_PREVDOWN    0x0080
#define KC_LONEKEY     0x0100
#define KC_DEADKEY     0x0200
#define KC_COMPOSITE   0x0400
#define KC_INVALIDCOMP 0x0800
#define KC_TOGGLE      0x1000
#define KC_INVALIDCHAR 0x2000
#define KC_DBCSRSRVD1  0x4000
#define KC_DBCSRSRVD2  0x8000

#define INP_NONE   0x0000
#define INP_KBD    0x0001
#define INP_MULT   0x0002
#define INP_RES2   0x0004
#define INP_SHIFT  0x0008
#define INP_CTRL   0x0010
#define INP_ALT    0x0020
#define INP_RES3   0x0040
#define INP_RES4   0x0080
#define INP_IGNORE 0xffff

#define JRN_QUEUESTATUS  1
#define JRN_PHYSKEYSTATE 2

#define WM_MOUSEFIRST         0x0070
#define WM_MOUSELAST          0x0079
#define WM_BUTTONCLICKFIRST   0x0071
#define WM_BUTTONCLICKLAST    0x0079
#define WM_MOUSEMOVE          0x0070
#define WM_BUTTON1DOWN        0x0071
#define WM_BUTTON1UP          0x0072
#define WM_BUTTON1DBLCLK      0x0073
#define WM_BUTTON2DOWN        0x0074
#define WM_BUTTON2UP          0x0075
#define WM_BUTTON2DBLCLK      0x0076
#define WM_BUTTON3DOWN        0x0077
#define WM_BUTTON3UP          0x0078
#define WM_BUTTON3DBLCLK      0x0079
#define WM_JOURNALNOTIFY      0x007C
#define WM_MOUSEMAP           0x007D
#define WM_EXTMOUSEFIRST      0x0410
#define WM_EXTMOUSELAST       0x0419
#define WM_CHORD              0x0410
#define WM_BUTTON1MOTIONSTART 0x0411
#define WM_BUTTON1MOTIONEND   0x0412
#define WM_BUTTON1CLICK       0x0413
#define WM_BUTTON2MOTIONSTART 0x0414
#define WM_BUTTON2MOTIONEND   0x0415
#define WM_BUTTON2CLICK       0x0416
#define WM_BUTTON3MOTIONSTART 0x0417
#define WM_BUTTON3MOTIONEND   0x0418
#define WM_BUTTON3CLICK       0x0419
#define WM_BEGINDRAG          0x0420
#define WM_ENDDRAG            0x0421
#define WM_SINGLESELECT       0x0422
#define WM_OPEN               0x0423
#define WM_CONTEXTMENU        0x0424
#define WM_CONTEXTHELP        0x0425
#define WM_TEXTEDIT           0x0426
#define WM_BEGINSELECT        0x0427
#define WM_ENDSELECT          0x0428
#define WM_PICKUP             0x0429
#define WM_PENFIRST           0x04C0
#define WM_PENLAST            0x04FF
#define WM_MMPMFIRST          0x0500
#define WM_MMPMLAST           0x05FF
#define WM_STDDLGFIRST        0x0600
#define WM_STDDLGLAST         0x065F
#define WM_BIDI_FIRST         0x0BD0
#define WM_BIDI_LAST          0x0BFF
#define WM_CHAR               0x007A
#define WM_VIOCHAR            0x007B

#define CHARMSG(pmsg) ((PCHRMSG)((PBYTE)pmsg + sizeof(MPARAM)))
#define MOUSEMSG(pmsg) ((PMSEMSG)((PBYTE)pmsg + sizeof(MPARAM)))

typedef struct _CHARMSG {
    USHORT fs;
    UCHAR  cRepeat;
    UCHAR  scancode;
    USHORT chr;
    USHORT vkey;
} CHRMSG, *PCHRMSG;

typedef struct _MOUSEMSG {
    SHORT  x;
    SHORT  y;
    USHORT codeHitTest;
    USHORT fsInp;
} MSEMSG, *PMSEMSG;

BOOL   APIENTRY WinCheckInput(HAB);
BOOL   APIENTRY WinEnablePhysInput(HWND,BOOL);
LONG   APIENTRY WinGetKeyState(HWND,LONG);
LONG   APIENTRY WinGetPhysKeyState(HWND,LONG);
BOOL   APIENTRY WinIsPhysInputEnabled(HWND);
HWND   APIENTRY WinQueryCapture(HWND);
HWND   APIENTRY WinQueryFocus(HWND);
BOOL   APIENTRY WinSetCapture(HWND,HWND);
BOOL   APIENTRY WinSetKeyboardStateTable(HWND,PBYTE,BOOL);

#endif

#ifdef INCL_WINLISTBOXES

#define LN_SELECT    1
#define LN_SETFOCUS  2
#define LN_KILLFOCUS 3
#define LN_SCROLL    4
#define LN_ENTER     5

#define LS_MULTIPLESEL 0x0001
#define LS_OWNERDRAW   0x0002
#define LS_NOADJUSTPOS 0x0004
#define LS_HORZSCROLL  0x0008
#define LS_EXTENDEDSEL 0x0010

#define LM_QUERYITEMCOUNT      0x0160
#define LM_INSERTITEM          0x0161
#define LM_SETTOPINDEX         0x0162
#define LM_DELETEITEM          0x0163
#define LM_SELECTITEM          0x0164
#define LM_QUERYSELECTION      0x0165
#define LM_SETITEMTEXT         0x0166
#define LM_QUERYITEMTEXTLENGTH 0x0167
#define LM_QUERYITEMTEXT       0x0168
#define LM_SETITEMHANDLE       0x0169
#define LM_QUERYITEMHANDLE     0x016a
#define LM_SEARCHSTRING        0x016b
#define LM_SETITEMHEIGHT       0x016c
#define LM_QUERYTOPINDEX       0x016d
#define LM_DELETEALL           0x016e
#define LM_INSERTMULTITEMS     0x016f
#define LM_SETITEMWIDTH        0x0660

#define LIT_CURSOR   (-4)
#define LIT_ERROR    (-3)
#define LIT_MEMERROR (-2)
#define LIT_NONE     (-1)
#define LIT_FIRST    (-1)

#define LIT_END            (-1)
#define LIT_SORTASCENDING  (-2)
#define LIT_SORTDESCENDING (-3)

#define LSS_SUBSTRING     1
#define LSS_PREFIX        2
#define LSS_CASESENSITIVE 4

#define WinDeleteLboxItem(hwndLbox, index) \
    ((LONG)WinSendMsg(hwndLbox, LM_DELETEITEM, MPFROMLONG(index), (MPARAM)NULL))
#define WinInsertLboxItem(hwndLbox, index, psz) \
    ((LONG)WinSendMsg(hwndLbox, LM_INSERTITEM, MPFROMLONG(index), MPFROMP(psz)))
#define WinQueryLboxCount(hwndLbox) \
    ((LONG)WinSendMsg(hwndLbox, LM_QUERYITEMCOUNT, (MPARAM)NULL, (MPARAM)NULL))
#define WinQueryLboxItemText(hwndLbox, index, psz, cchMax) \
    ((LONG)WinSendMsg(hwndLbox, LM_QUERYITEMTEXT, MPFROM2SHORT((index), (cchMax)), MPFROMP(psz)))
#define WinQueryLboxItemTextLength(hwndLbox, index) \
    ((SHORT)WinSendMsg(hwndLbox, LM_QUERYITEMTEXTLENGTH, MPFROMSHORT(index), (MPARAM)NULL))
#define WinSetLboxItemText(hwndLbox, index, psz) \
    ((BOOL)WinSendMsg(hwndLbox, LM_SETITEMTEXT, MPFROMLONG(index), MPFROMP(psz)))
#define WinQueryLboxSelectedItem(hwndLbox) \
    ((LONG)WinSendMsg(hwndLbox, LM_QUERYSELECTION, MPFROMLONG(LIT_FIRST), (MPARAM)NULL))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -