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

📄 pmwin.mh

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 MH
📖 第 1 页 / 共 4 页
字号:
#define WM_SAVEAPPLICATION      0x003e
#define WM_HELPBASE             0x0F00
#define WM_HELPTOP              0x0FFF
#define WM_USER                 0x1000

#define COMMANDMSG(pmsg) ((struct _COMMANDMSG FAR *)((PBYTE)pmsg - sizeof(MPARAM) * 2))

typedef LHANDLE HMQ;

typedef struct _COMMANDMSG {
    USHORT source;
    BOOL   fMouse;
    USHORT cmd;
    USHORT unused;
} CMDMSG;

typedef struct _MQINFO {
    USHORT cb;
    PID    pid;
    TID    tid;
    USHORT cmsgs;
    PVOID  pReserved;
} MQINFO, FAR *PMQINFO;

typedef struct _QMSG {
    HWND   hwnd;
    USHORT msg;
    MPARAM mp1;
    MPARAM mp2;
    ULONG  time;
    POINTL ptl;
} QMSG, FAR *PQMSG;

BOOL    APIENTRY WinCancelShutdown(HMQ,BOOL);
HMQ     APIENTRY WinCreateMsgQueue(HAB,SHORT);
BOOL    APIENTRY WinDestroyMsgQueue(HMQ);
MRESULT APIENTRY WinDispatchMsg(HAB,PQMSG);
BOOL    APIENTRY WinGetMsg(HAB,PQMSG,HWND,USHORT,USHORT);
BOOL    APIENTRY WinPeekMsg(HAB,PQMSG,HWND,USHORT,USHORT,USHORT);
BOOL    APIENTRY WinPostMsg(HWND,USHORT,MPARAM,MPARAM);
BOOL    APIENTRY WinQueryQueueInfo(HMQ,PMQINFO,USHORT);
BOOL    APIENTRY WinRegisterUserDatatype(HAB,SHORT,SHORT,PSHORT);
BOOL    APIENTRY WinRegisterUserMsg(HAB,USHORT,SHORT,SHORT,SHORT,SHORT,SHORT);
MRESULT APIENTRY WinSendMsg(HWND,USHORT,MPARAM,MPARAM);
BOOL    APIENTRY WinSetMsgMode(HAB,PSZ,SHORT);
BOOL    APIENTRY WinSetSynchroMode(HAB,SHORT);

#endif

#if defined(INCL_WINMESSAGEMGR)

#define BMSG_POST        0x0000
#define BMSG_SEND        0x0001
#define BMSG_POSTQUEUE   0x0002
#define BMSG_DESCENDANTS 0x0004
#define BMSG_FRAMEONLY   0x0008

#define CVR_ALIGNLEFT   0x0001
#define CVR_ALIGNBOTTOM 0x0002
#define CVR_ALIGNRIGHT  0x0004
#define CVR_ALIGNTOP    0x0008
#define CVR_REDRAW      0x0010

#define HT_NORMAL      0
#define HT_TRANSPARENT (-1)
#define HT_DISCARD     (-2)
#define HT_ERROR       (-3)

#define QS_KEY         0x0001
#define QS_MOUSEBUTTON 0x0002
#define QS_MOUSEMOVE   0x0004
#define QS_MOUSE       0x0006
#define QS_TIMER       0x0008
#define QS_PAINT       0x0010
#define QS_POSTMSG     0x0020
#define QS_SEM1        0x0040
#define QS_SEM2        0x0080
#define QS_SEM3        0x0100
#define QS_SEM4        0x0200
#define QS_SENDMSG     0x0400

#define SMIM_ALL         0x0EFF
#define SMI_NOINTEREST   0x0001
#define SMI_INTEREST     0x0002
#define SMI_RESET        0x0004
#define SMI_AUTODISPATCH 0x0008

#define WPM_TEXT         0x0001
#define WPM_CTLDATA      0x0002
#define WPM_PRESPARAMS   0x0004
#define WPM_CCHTEXT      0x0008
#define WPM_CBCTLDATA    0x0010
#define WPM_CBPRESPARAMS 0x0020

typedef struct _WNDPARAMS {
    USHORT fsStatus;
    USHORT cchText;
    PSZ    pszText;
    USHORT cbPresParams;
    PVOID  pPresParams;
    USHORT cbCtlData;
    PVOID  pCtlData;
} WNDPARAMS, FAR *PWNDPARAMS;

BOOL   APIENTRY WinBroadcastMsg(HWND,USHORT,MPARAM,MPARAM,USHORT);
BOOL   APIENTRY WinInSendMsg(HAB);
USHORT APIENTRY WinMsgMuxSemWait(PUSHORT,PVOID,LONG);
USHORT APIENTRY WinMsgSemWait(HSEM,LONG);
BOOL   APIENTRY WinPostQueueMsg(HMQ,USHORT,MPARAM,MPARAM);
BOOL   APIENTRY WinQueryMsgPos(HAB,PPOINTL);
ULONG  APIENTRY WinQueryMsgTime(HAB);
ULONG  APIENTRY WinQueryQueueStatus(HWND);
BOOL   APIENTRY WinSetClassMsgInterest(HAB,PSZ,USHORT,SHORT);
BOOL   APIENTRY WinSetMsgInterest(HWND,USHORT,SHORT);
BOOL   APIENTRY WinWaitMsg(HAB,USHORT,USHORT);

#endif

#ifdef INCL_WINFRAMECTLS

#define WC_TITLEBAR ((PSZ)0xffff0009L)

#define TBM_SETHILITE   0x01e3
#define TBM_QUERYHILITE 0x01e4
#define TBM_TRACKMOVE   0x01e5

#endif

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

#define FCF_TITLEBAR          0x00000001L
#define FCF_SYSMENU           0x00000002L
#define FCF_MENU              0x00000004L
#define FCF_SIZEBORDER        0x00000008L
#define FCF_MINBUTTON         0x00000010L
#define FCF_MAXBUTTON         0x00000020L
#define FCF_MINMAX            0x00000030L
#define FCF_VERTSCROLL        0x00000040L
#define FCF_HORZSCROLL        0x00000080L
#define FCF_DLGBORDER         0x00000100L
#define FCF_BORDER            0x00000200L
#define FCF_SHELLPOSITION     0x00000400L
#define FCF_TASKLIST          0x00000800L
#define FCF_NOBYTEALIGN       0x00001000L
#define FCF_NOMOVEWITHOWNER   0x00002000L
#define FCF_ICON              0x00004000L
#define FCF_ACCELTABLE        0x00008000L
#define FCF_SYSMODAL          0x00010000L
#define FCF_SCREENALIGN       0x00020000L
#define FCF_MOUSEALIGN        0x00040000L
#define FCF_PALETTE_NORMAL    0x00080000L
#define FCF_PALETTE_HELP      0x00100000L
#define FCF_PALETTE_POPUPODD  0x00200000L
#define FCF_PALETTE_POPUPEVEN 0x00400000L
#define FCF_DBE_APPSTAT       0x80000000L
#define FCF_STANDARD          0x0008CC3FL

#define FS_ICON            0x00000001L
#define FS_ACCELTABLE      0x00000002L
#define FS_SHELLPOSITION   0x00000004L
#define FS_TASKLIST        0x00000008L
#define FS_NOBYTEALIGN     0x00000010L
#define FS_NOMOVEWITHOWNER 0x00000020L
#define FS_SYSMODAL        0x00000040L
#define FS_DLGBORDER       0x00000080L
#define FS_BORDER          0x00000100L
#define FS_SCREENALIGN     0x00000200L
#define FS_MOUSEALIGN      0x00000400L
#define FS_SIZEBORDER      0x00000800L
#define FS_DBE_APPSTAT     0x00008000L
#define FS_STANDARD        0x0000000FL

#define FF_FLASHWINDOW   0x0001
#define FF_ACTIVE        0x0002
#define FF_FLASHHILITE   0x0004
#define FF_OWNERHIDDEN   0x0008
#define FF_DLGDISMISSED  0x0010
#define FF_OWNERDISABLED 0x0020
#define FF_SELECTED      0x0040
#define FF_NOACTIVATESWP 0x0080

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

HWND  APIENTRY WinCreateStdWindow(HWND,ULONG,PULONG,PSZ,PSZ,ULONG,HMODULE,USHORT,PHWND);

#endif

#ifdef INCL_WINFRAMEMGR

#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_CALCFRAMERECT      0x0053
#define WM_WINDOWPOSCHANGED   0x0055
#define WM_QUERYFRAMECTLCOUNT 0x0059
#define WM_QUERYHELPINFO      0x005B
#define WM_SETHELPINFO        0x005C
#define WM_ERROR              0x005D

#define FI_FRAME           0x00000001L
#define FI_OWNERHIDE       0x00000002L
#define FI_ACTIVATEOK      0x00000004L
#define FI_NOMOVEWITHOWNER 0x00000008L

#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 WC_FRAME ((PSZ)0xffff0001L)

BOOL  APIENTRY WinCalcFrameRect(HWND,PRECTL,BOOL);
BOOL  APIENTRY WinCreateFrameControls(HWND,PFRAMECDATA,PSZ);
BOOL  APIENTRY WinFlashWindow(HWND,BOOL);
BOOL  APIENTRY WinGetMaxPosition(HWND,PSWP);
BOOL  APIENTRY WinGetMinPosition(HWND,PSWP,PPOINTL);

#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 HMQ_CURRENT  ((HMQ)1)

#define MSGF_DIALOGBOX  1
#define MSGF_MESSAGEBOX 2
#define MSGF_TRACK      8

#define HLPM_FRAME  (-1)
#define HLPM_WINDOW (-2)
#define HLPM_MENU   (-3)

#define LHK_DELETEPROC 1
#define LHK_DELETELIB  2
#define LHK_LOADPROC   3
#define LHK_LOADLIB    4

#define MCHK_MSGINTEREST      1
#define MCHK_CLASSMSGINTEREST 2
#define MCHK_SYNCHRONISATION  3
#define MCHK_MSGMODE          4

#define RUMHK_DATATYPE 1
#define RUMHK_MSG      2

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

BOOL APIENTRY WinCallMsgFilter(HAB,PQMSG,USHORT);
BOOL APIENTRY WinReleaseHook(HAB,HMQ,SHORT,PFN,HMODULE);
BOOL APIENTRY WinSetHook(HAB,HMQ,SHORT,PFN,HMODULE);

#endif

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

#define MB_OK               0x0000
#define MB_OKCANCEL         0x0001
#define MB_RETRYCANCEL      0x0002
#define MB_ABORTRETRYIGNORE 0x0003
#define MB_YESNO            0x0004
#define MB_YESNOCANCEL      0x0005
#define MB_CANCEL           0x0006
#define MB_ENTER            0x0007
#define MB_ENTERCANCEL      0x0008
#define MB_NOICON           0x0000
#define MB_CUANOTIFICATION  0x0000
#define MB_ICONQUESTION     0x0010
#define MB_ICONEXCLAMATION  0x0020
#define MB_CUAWARNING       0x0020
#define MB_ICONASTERISK     0x0030
#define MB_ICONHAND         0x0040
#define MB_CUACRITICAL      0x0040
#define MB_QUERY            MB_ICONQUESTION
#define MB_WARNING          MB_CUAWARNING
#define MB_INFORMATION      MB_ICONASTERISK
#define MB_CRITICAL         MB_CUACRITICAL
#define MB_ERROR            MB_CRITICAL
#define MB_DEFBUTTON1       0x0000
#define MB_DEFBUTTON2       0x0100
#define MB_DEFBUTTON3       0x0200
#define MB_APPLMODAL        0x0000
#define MB_SYSTEMMODAL      0x1000
#define MB_HELP             0x2000
#define MB_MOVEABLE         0x4000

#define MBID_OK     1
#define MBID_CANCEL 2
#define MBID_ABORT  3
#define MBID_RETRY  4
#define MBID_IGNORE 5
#define MBID_YES    6
#define MBID_NO     7
#define MBID_HELP   8
#define MBID_ENTER  9
#define MBID_ERROR  0xffff

#define DID_OK     1
#define DID_CANCEL 2
#define DID_ERROR  0xffff

#define WA_WARNING                 0
#define WA_NOTE                    1
#define WA_ERROR                   2
#define WA_CWINALARMS              3

BOOL    APIENTRY WinAlarm(HWND,USHORT);
MRESULT APIENTRY WinDefDlgProc(HWND,USHORT,MPARAM,MPARAM);
BOOL    APIENTRY WinDismissDlg(HWND hwndDlg, USHORT usResult);
USHORT  APIENTRY WinDlgBox(HWND,HWND,PFNWP,HMODULE,USHORT,PVOID);
BOOL    APIENTRY WinGetDlgMsg(HWND,PQMSG);
HWND    APIENTRY WinLoadDlg(HWND,HWND,PFNWP,HMODULE,USHORT,PVOID);
USHORT  APIENTRY WinMessageBox(HWND,HWND,PSZ,PSZ,USHORT,USHORT);
BOOL    APIENTRY WinQueryDlgItemShort(HWND,USHORT,PSHORT,BOOL);
USHORT  APIENTRY WinQueryDlgItemText(HWND,USHORT,SHORT,PSZ);
SHORT   APIENTRY WinQueryDlgItemTextLength(HWND,USHORT);
BOOL    APIENTRY WinSetDlgItemShort(HWND,USHORT,USHORT,BOOL);
BOOL    APIENTRY WinSetDlgItemText(HWND,USHORT,PSZ);

#endif

#ifdef INCL_WINDIALOGS

#define DLGC_ENTRYFIELD  0x0001
#define DLGC_BUTTON      0x0002
#define DLGC_RADIOBUTTON 0x0004
#define DLGC_STATIC      0x0008
#define DLGC_DEFAULT     0x0010
#define DLGC_PUSHBUTTON  0x0020
#define DLGC_CHECKBOX    0x0040
#define DLGC_SCROLLBAR   0x0080
#define DLGC_MENU        0x0100
#define DLGC_TABONCLICK  0x0200
#define DLGC_MLE         0x0400

#define EDI_FIRSTTABITEM   0
#define EDI_LASTTABITEM    1
#define EDI_NEXTTABITEM    2
#define EDI_PREVTABITEM    3
#define EDI_FIRSTGROUPITEM 4
#define EDI_LASTGROUPITEM  5
#define EDI_NEXTGROUPITEM  6
#define EDI_PREVGROUPITEM  7

typedef struct _DLGTITEM {
    USHORT fsItemStatus;
    USHORT cChildren;
    USHORT cchClassName;
    USHORT offClassName;
    USHORT cchText;
    USHORT offText;
    ULONG  flStyle;
    SHORT  x;
    SHORT  y;
    SHORT  cx;
    SHORT  cy;
    USHORT id;
    USHORT offPresParams;
    USHORT offCtlData;
} DLGTITEM, FAR *PDLGTITEM;

typedef struct _DLGTEMPLATE {
    USHORT   cbTemplate;
    USHORT   type;
    USHORT   codepage;
    USHORT   offadlgti;
    USHORT   fsTemplateStatus;
    USHORT   iItemFocus;
    USHORT   coffPresParams;
    DLGTITEM adlgti[1];
} DLGTEMPLATE, FAR *PDLGTEMPLATE;

HWND    APIENTRY WinCreateDlg(HWND,HWND,PFNWP,PDLGTEMPLATE,PVOID);
HWND    APIENTRY WinEnumDlgItem(HWND,HWND,USHORT,BOOL);
BOOL    APIENTRY WinMapDlgPoints(HWND,PPOINTL,USHORT,BOOL);
USHORT  APIENTRY WinProcessDlg(HWND);
MRESULT APIENTRY WinSendDlgItemMsg(HWND,USHORT,USHORT,MPARAM,MPARAM);
USHORT  APIENTRY WinStartDlg(HWND);
SHORT   APIENTRY WinSubstituteStrings(HWND,PSZ,SHORT,PSZ);

#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_NOSETACTIVEFOCUS      0x0003
#define FC_NOSETACTIVE           0x0004
#define FC_NOLOSEACTIVE          0x0008
#define FC_NOSETSELECTION        0x0010
#define FC_NOLOSESELECTION       0x0020

⌨️ 快捷键说明

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