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

📄 pmwin.mh

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 MH
📖 第 1 页 / 共 5 页
字号:

#endif

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

#define QW_NEXT       0
#define QW_PREV       1
#define QW_TOP        2
#define QW_BOTTOM     3
#define QW_OWNER      4
#define QW_PARENT     5
#define QW_NEXTTOP    6
#define QW_PREVTOP    7
#define QW_FRAMEOWNER 8

#define AWP_MINIMIZED  0x00010000
#define AWP_MAXIMIZED  0x00020000
#define AWP_RESTORED   0x00040000
#define AWP_ACTIVATE   0x00080000
#define AWP_DEACTIVATE 0x00100000

#define SWP_SIZE            0x0001
#define SWP_MOVE            0x0002
#define SWP_ZORDER          0x0004
#define SWP_SHOW            0x0008
#define SWP_HIDE            0x0010
#define SWP_NOREDRAW        0x0020
#define SWP_NOADJUST        0x0040
#define SWP_ACTIVATE        0x0080
#define SWP_DEACTIVATE      0x0100
#define SWP_EXTSTATECHANGE  0x0200
#define SWP_MINIMIZE        0x0400
#define SWP_MAXIMIZE        0x0800
#define SWP_RESTORE         0x1000
#define SWP_FOCUSACTIVATE   0x2000
#define SWP_FOCUSDEACTIVATE 0x4000
#define SWP_NOAUTOCLOSE     0x8000

#define DT_LEFT            0x00000000
#define DT_QUERYEXTENT     0x00000002
#define DT_UNDERSCORE      0x00000010
#define DT_STRIKEOUT       0x00000020
#define DT_TEXTATTRS       0x00000040
#define DT_EXTERNALLEADING 0x00000080
#define DT_CENTER          0x00000100
#define DT_RIGHT           0x00000200
#define DT_TOP             0x00000000
#define DT_VCENTER         0x00000400
#define DT_BOTTOM          0x00000800
#define DT_HALFTONE        0x00001000
#define DT_MNEMONIC        0x00002000
#define DT_WORDBREAK       0x00004000
#define DT_ERASERECT       0x00008000

#define PSF_LOCKWINDOWUPDATE 0x0001
#define PSF_CLIPUPWARDS      0x0002
#define PSF_CLIPDOWNWARDS    0x0004
#define PSF_CLIPSIBLINGS     0x0008
#define PSF_CLIPCHILDREN     0x0010
#define PSF_PARENTCLIP       0x0020

#define SW_SCROLLCHILDREN 1
#define SW_INVALIDATERGN  2

#define DBM_NORMAL     0x0000
#define DBM_INVERT     0x0001
#define DBM_HALFTONE   0x0002
#define DBM_STRETCH    0x0004
#define DBM_IMAGEATTRS 0x0008
#define DBM_XOR        0x0010

#define DB_PATCOPY     0x0000
#define DB_PATINVERT   0x0001
#define DB_DESTINVERT  0x0002
#define DB_AREAMIXMODE 0x0003
#define DB_ROP         0x0007
#define DB_INTERIOR    0x0008
#define DB_AREAATTRS   0x0010
#define DB_STANDARD    0x0100
#define DB_DLGBORDER   0x0200

typedef struct _SWP {
    ULONG fl;
    LONG  cy;
    LONG  cx;
    LONG  y;
    LONG  x;
    HWND  hwndInsertBehind;
    HWND  hwnd;
    ULONG ulReserved1;
    ULONG ulReserved2;
} SWP, *PSWP;

HPS     APIENTRY WinBeginPaint(HWND,HPS,PRECTL);
HWND    APIENTRY WinCreateWindow(HWND,PCSZ,PCSZ,ULONG,LONG,LONG,LONG,LONG,HWND,HWND,ULONG,PVOID,PVOID);
MRESULT APIENTRY WinDefWindowProc(HWND,ULONG,MPARAM,MPARAM);
BOOL    APIENTRY WinDestroyWindow(HWND);
BOOL    APIENTRY WinDrawBitmap(HPS,HBITMAP,PRECTL,PPOINTL,LONG,LONG,ULONG);
BOOL    APIENTRY WinDrawBorder(HPS,PRECTL,LONG,LONG,LONG,LONG,ULONG);
LONG    APIENTRY WinDrawText(HPS,LONG,PCH,PRECTL,LONG,LONG,ULONG);
BOOL    APIENTRY WinEnableWindow(HWND,BOOL);
BOOL    APIENTRY WinEnableWindowUpdate(HWND,BOOL);
BOOL    APIENTRY WinEndPaint(HPS);
BOOL    APIENTRY WinFillRect(HPS,PRECTL,LONG);
HPS     APIENTRY WinGetClipPS(HWND,HWND,ULONG);
HPS     APIENTRY WinGetPS(HWND);
HAB     APIENTRY WinInitialize(ULONG);
BOOL    APIENTRY WinInvalidateRect(HWND,PRECTL,BOOL);
BOOL    APIENTRY WinInvalidateRegion(HWND,HRGN,BOOL);
BOOL    APIENTRY WinInvertRect(HPS,PRECTL);
BOOL    APIENTRY WinIsChild(HWND,HWND);
BOOL    APIENTRY WinIsWindow(HAB,HWND);
BOOL    APIENTRY WinIsWindowEnabled(HWND);
BOOL    APIENTRY WinIsWindowShowing(HWND);
BOOL    APIENTRY WinIsWindowVisible(HWND);
LONG    APIENTRY WinLoadMessage(HAB,HMODULE,ULONG,LONG,PSZ);
LONG    APIENTRY WinLoadString(HAB,HMODULE,ULONG,LONG,PSZ);
LONG    APIENTRY WinMultWindowFromIDs(HWND,PHWND,ULONG,ULONG);
HDC     APIENTRY WinOpenWindowDC(HWND);
HAB     APIENTRY WinQueryAnchorBlock(HWND);
HWND    APIENTRY WinQueryDesktopWindow(HAB,HDC);
HWND    APIENTRY WinQueryObjectWindow(HWND);
ULONG   APIENTRY WinQueryVersion(HAB);
HWND    APIENTRY WinQueryWindow(HWND,LONG);
BOOL    APIENTRY WinQueryWindowPos(HWND,PSWP);
BOOL    APIENTRY WinQueryWindowProcess(HWND,PPID,PTID);
BOOL    APIENTRY WinQueryWindowRect(HWND,PRECTL);
LONG    APIENTRY WinQueryWindowText(HWND,LONG,PCH);
LONG    APIENTRY WinQueryWindowTextLength(HWND);
BOOL    APIENTRY WinRegisterClass(HAB,PCSZ,PFNWP,ULONG,ULONG);
BOOL    APIENTRY WinReleasePS(HPS);
LONG    APIENTRY WinScrollWindow(HWND,LONG,LONG,PRECTL,PRECTL,HRGN,PRECTL,ULONG);
BOOL    APIENTRY WinSetActiveWindow(HWND,HWND);
BOOL    APIENTRY WinSetMultWindowPos(HAB,PSWP,ULONG);
BOOL    APIENTRY WinSetOwner(HWND,HWND);
BOOL    APIENTRY WinSetParent(HWND,HWND,BOOL);
BOOL    APIENTRY WinSetSysModalWindow(HWND,HWND);
BOOL    APIENTRY WinSetWindowPos(HWND,HWND,LONG,LONG,LONG,LONG,ULONG);
BOOL    APIENTRY WinSetWindowText(HWND,PCSZ);
BOOL    APIENTRY WinShowWindow(HWND,BOOL);
BOOL    APIENTRY WinTerminate(HAB);
BOOL    APIENTRY WinUpdateWindow(HWND);
HWND    APIENTRY WinWindowFromID(HWND,ULONG);

#endif

#ifdef INCL_WINWINDOWMGR

#define WM_QUERYCONVERTPOS  0x00b0
#define QCP_CONVERT         0x0001
#define QCP_NOCONVERT       0x0000

#define QCRGN_ERROR          0
#define QCRGN_OK             1
#define QCRGN_NO_CLIP_REGION 2

#define QWS_USER 0
#define QWS_ID   (-1)
#define QWS_MIN  (-1)

#define QWL_USER     0
#define QWL_STYLE    (-2)
#define QWP_PFNWP    (-3)
#define QWL_HMQ      (-4)
#define QWL_RESERVED (-5)
#define QWL_PENDATA  (-7)
#define QWL_BD_ATTR  (-9)
#define QWL_BD_STAT  (-10)
#define QWL_KBDLAYER (-11)
#define QWL_MIN      (-11)

#define QWL_HHEAP         0x0004
#define QWL_HWNDFOCUSSAVE 0x0018
#define QWL_DEFBUTTON     0x0040
#define QWL_PSSCBLK       0x0048
#define QWL_PFEPBLK       0x004c
#define QWL_PSTATBLK      0x0050

#define QWS_FLAGS     0x0008
#define QWS_RESULT    0x000a
#define QWS_XRESTORE  0x000c
#define QWS_YRESTORE  0x000e
#define QWS_CXRESTORE 0x0010
#define QWS_CYRESTORE 0x0012
#define QWS_XMINIMIZE 0x0014
#define QWS_YMINIMIZE 0x0016

typedef LHANDLE HENUM;

typedef struct _CLASSINFO {
    ULONG     flClassStyle;
    PFNWP     pfnWindowProc;
    ULONG     cbWindowData;
} CLASSINFO, *PCLASSINFO;

typedef struct _CREATESTRUCT {
    PVOID pPresParams;
    PVOID pCtlData;
    ULONG id;
    HWND  hwndInsertBehind;
    HWND  hwndOwner;
    LONG  cy;
    LONG  cx;
    LONG  y;
    LONG  x;
    ULONG flStyle;
    PSZ   pszText;
    PSZ   pszClass;
    HWND  hwndParent;
} CREATESTRUCT, *PCREATESTRUCT;

HENUM   APIENTRY WinBeginEnumWindows(HWND);
BOOL    APIENTRY WinEndEnumWindows(HENUM);
LONG    APIENTRY WinExcludeUpdateRegion(HPS,HWND);
HWND    APIENTRY WinGetNextWindow(HENUM);
HPS     APIENTRY WinGetScreenPS(HWND);
BOOL    APIENTRY WinIsThreadActive(HAB);
BOOL    APIENTRY WinLockVisRegions(HWND,BOOL);
BOOL    APIENTRY WinLockWindowUpdate(HWND,HWND);
BOOL    APIENTRY WinMapWindowPoints(HWND,HWND,PPOINTL,LONG);
HWND    APIENTRY WinQueryActiveWindow(HWND);
BOOL    APIENTRY WinQueryClassInfo(HAB,PCSZ,PCLASSINFO);
LONG    APIENTRY WinQueryClassName(HWND,LONG,PCH);
LONG    APIENTRY WinQueryClipRegion(HWND,HRGN);
HWND    APIENTRY WinQuerySysModalWindow(HWND);
BOOL    APIENTRY WinQueryUpdateRect(HWND,PRECTL);
LONG    APIENTRY WinQueryUpdateRegion(HWND,HRGN);
HDC     APIENTRY WinQueryWindowDC(HWND);
PVOID   APIENTRY WinQueryWindowPtr(HWND,LONG);
ULONG   APIENTRY WinQueryWindowULong(HWND,LONG);
USHORT  APIENTRY WinQueryWindowUShort(HWND,LONG);
BOOL    APIENTRY WinSetClipRegion(HWND,HRGN);
BOOL    APIENTRY WinSetSysModalWindow(HWND,HWND);
BOOL    APIENTRY WinSetWindowBits(HWND,LONG,ULONG,ULONG);
BOOL    APIENTRY WinSetWindowPtr(HWND,LONG,PVOID);
BOOL    APIENTRY WinSetWindowULong(HWND,LONG,ULONG);
BOOL    APIENTRY WinSetWindowUShort(HWND,LONG,USHORT);
PFNWP   APIENTRY WinSubclassWindow(HWND,PFNWP);
BOOL    APIENTRY WinValidateRect(HWND,PRECTL,BOOL);
BOOL    APIENTRY WinValidateRegion(HWND,HRGN,BOOL);
HWND    APIENTRY WinWindowFromDC(HDC);
HWND    APIENTRY WinWindowFromPoint(HWND,PPOINTL,BOOL);

#endif

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

#define PM_REMOVE   1
#define PM_NOREMOVE 0

#define CMDSRC_PUSHBUTTON  1
#define CMDSRC_MENU        2
#define CMDSRC_ACCELERATOR 3
#define CMDSRC_FONTDLG     4
#define CMDSRC_FILEDLG     5
#define CMDSRC_PRINTDLG    6
#define CMDSRC_COLORDLG    7
#define CMDSRC_OTHER       0

#define WM_NULL                 0x0000
#define WM_CREATE               0x0001
#define WM_DESTROY              0x0002
#define WM_ENABLE               0x0004
#define WM_SHOW                 0x0005
#define WM_MOVE                 0x0006
#define WM_SIZE                 0x0007
#define WM_ADJUSTWINDOWPOS      0x0008
#define WM_CALCVALIDRECTS       0x0009
#define WM_SETWINDOWPARAMS      0x000a
#define WM_QUERYWINDOWPARAMS    0x000b
#define WM_HITTEST              0x000c
#define WM_ACTIVATE             0x000d
#define WM_SETFOCUS             0x000f
#define WM_SETSELECTION         0x0010
#define WM_PPAINT               0x0011
#define WM_PSETFOCUS            0x0012
#define WM_PSYSCOLORCHANGE      0x0013
#define WM_PSIZE                0x0014
#define WM_PACTIVATE            0x0015
#define WM_PCONTROL             0x0016
#define WM_COMMAND              0x0020
#define WM_SYSCOMMAND           0x0021
#define WM_HELP                 0x0022
#define WM_PAINT                0x0023
#define WM_TIMER                0x0024
#define WM_SEM1                 0x0025
#define WM_SEM2                 0x0026
#define WM_SEM3                 0x0027
#define WM_SEM4                 0x0028
#define WM_CLOSE                0x0029
#define WM_QUIT                 0x002a
#define WM_SYSCOLORCHANGE       0x002b
#define WM_SYSVALUECHANGED      0x002d
#define WM_APPTERMINATENOTIFY   0x002e
#define WM_PRESPARAMCHANGED     0x002f
#define WM_CONTROL              0x0030
#define WM_VSCROLL              0x0031
#define WM_HSCROLL              0x0032
#define WM_INITMENU             0x0033
#define WM_MENUSELECT           0x0034
#define WM_MENUEND              0x0035
#define WM_DRAWITEM             0x0036
#define WM_MEASUREITEM          0x0037
#define WM_CONTROLPOINTER       0x0038
#define WM_QUERYDLGCODE         0x003a
#define WM_INITDLG              0x003b
#define WM_SUBSTITUTESTRING     0x003c
#define WM_MATCHMNEMONIC        0x003d
#define WM_SAVEAPPLICATION      0x003e
#define WM_SEMANTICEVENT        0x0490
#define WM_HELPBASE             0x0F00
#define WM_HELPTOP              0x0FFF
#define WM_USER                 0x1000

#define RUM_IN    1
#define RUM_OUT   2
#define RUM_INOUT 3

#define SMD_DELAYED      0x0001
#define SMD_IMMEDIATE    0x0002
#define SSM_SYNCHRONOUS  0x0001
#define SSM_ASYNCHRONOUS 0x0002
#define SSM_MIXED        0x0003

#ifdef INCL_WINTYPES
  #include <pmtypes.h>
#endif

#define COMMANDMSG(pmsg) ((PCMDMSG)((PBYTE)pmsg + sizeof(MPARAM)))

typedef LHANDLE HMQ, *PHMQ;

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

typedef struct _COMMANDMSG {
    USHORT cmd;
    USHORT unused;
    USHORT source;
    USHORT fMouse;
} CMDMSG, *PCMDMSG;

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

BOOL    APIENTRY WinCancelShutdown(HMQ,BOOL);
HMQ     APIENTRY WinCreateMsgQueue(HAB,LONG);
BOOL    APIENTRY WinDestroyMsgQueue(HMQ);
MRESULT APIENTRY WinDispatchMsg(HAB,PQMSG);
BOOL    APIENTRY WinGetMsg(HAB,PQMSG,HWND,ULONG,ULONG);
BOOL    APIENTRY WinPeekMsg(HAB,PQMSG,HWND,ULONG,ULONG,ULONG);
BOOL    APIENTRY WinPostMsg(HWND,ULONG,MPARAM,MPARAM);
BOOL    APIENTRY WinQueryQueueInfo(HMQ,PMQINFO,ULONG);
BOOL    APIENTRY WinRegisterUserDatatype(HAB,LONG,LONG,PLONG);
BOOL    APIENTRY WinRegisterUserMsg(HAB,ULONG,LONG,LONG,LONG,LONG,LONG);
MRESULT APIENTRY WinSendMsg(HWND,ULONG,MPARAM,MPARAM);
BOOL    APIENTRY WinSetMsgMode(HAB,PCSZ,LONG);
BOOL    APIENTRY WinSetSynchroMode(HAB,LONG);

#endif

#ifdef INCL_WINMESSAGEMGR

#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 WPM_TEXT         0x0001
#define WPM_CTLDATA      0x0002
#define WPM_PRESPARAMS   0x0004
#define WPM_CCHTEXT      0x0008
#define WPM_CBCTLDATA    0x0010
#define WPM_CBPRESPARAMS 0x0020

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

#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 QS_MSGINPUT    0x0800

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

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

BOOL    APIENTRY WinBroadcastMsg(HWND,ULONG,MPARAM,MPARAM,ULONG);
BOOL    APIENTRY WinInSendMsg(HAB);
APIRET  APIENTRY WinRequestMutexSem(HMTX,ULONG);

⌨️ 快捷键说明

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