📄 pmwin.mh
字号:
/*
* pmwin.h OS/2 Presentation Manager window manager include file
* for 16-bit development.
*
:include crwatcnt.sp
*/
:include readonly.sp
:include cpluspro.sp
#define INCL_WININCLUDED
#ifdef INCL_WIN
#define INCL_WINACCELERATORS
#define INCL_WINATOM
#define INCL_WINBUTTONS
#define INCL_WINCATCHTHROW
#define INCL_WINCLIPBOARD
#define INCL_WINDIALOGS
#define INCL_WINENTRYFIELDS
#define INCL_WINERRORS
#define INCL_WINFRAMECTLS
#define INCL_WINFRAMEMGR
#define INCL_WINHEAP
#define INCL_WINHELP
#define INCL_WINHOOKS
#define INCL_WININPUT
#define INCL_WINLISTBOXES
#define INCL_WINLOAD
#define INCL_WINMENUS
#define INCL_WINMESSAGEMGR
#define INCL_WINMLE
#define INCL_WINPOINTERS
#define INCL_WINPROGRAMLIST
#define INCL_WINRECTANGLES
#define INCL_WINSCROLLBARS
#define INCL_WINSHELLDATA
#define INCL_WINSTATICS
#define INCL_WINSWITCHLIST
#define INCL_WINSYS
#define INCL_WINTRACKRECT
#define INCL_WINWINDOWMGR
#else
#ifdef RC_INVOKED
#define INCL_WINACCELERATORS
#define INCL_WINBUTTONS
#define INCL_WINDIALOGS
#define INCL_WINENTRYFIELDS
#define INCL_WINFRAMECTLS
#define INCL_WINFRAMEMGR
#define INCL_WINHELP
#define INCL_WININPUT
#define INCL_WINLISTBOXES
#define INCL_WINMENUS
#define INCL_WINMESSAGEMGR
#define INCL_WINMLE
#define INCL_WINPOINTERS
#define INCL_WINSCROLLBARS
#define INCL_WINSTATICS
#endif
#endif
#ifdef INCL_WINMLE
#ifndef INCL_WINENTRYFIELDS
#define INCL_WINENTRYFIELDS
#endif
#define WC_MLE ((PSZ)0xffff000aL)
#include <pmmle.h>
#endif
#ifdef INCL_WINCOMMON
#define INCL_WINWINDOWMGR
#endif
#ifdef INCL_ERRORS
#define INCL_WINERRORS
#endif
#define MPFROMP(p) ((MPARAM)(VOID FAR *)(p))
#define MPFROMHWND(hwnd) ((MPARAM)(HWND)(hwnd))
#define MPFROMCHAR(ch) ((MPARAM)(USHORT)(ch))
#define MPFROMSHORT(s) ((MPARAM)(USHORT)(s))
#define MPFROM2SHORT(s1, s2)((MPARAM)MAKELONG(s1, s2))
#define MPFROMSH2CH(s, uch1, uch2) \
((MPARAM)MAKELONG(s, MAKESHORT(uch1, uch2)))
#define MPFROMLONG(l) ((MPARAM)(ULONG)(l))
#define PVOIDFROMMP(mp) ((VOID FAR *)(mp))
#define HWNDFROMMP(mp) ((HWND)(mp))
#define CHAR1FROMMP(mp) ((UCHAR)(mp))
#define CHAR2FROMMP(mp) ((UCHAR)((ULONG)mp >> 8))
#define CHAR3FROMMP(mp) ((UCHAR)((ULONG)mp >> 16))
#define CHAR4FROMMP(mp) ((UCHAR)((ULONG)mp >> 24))
#define SHORT1FROMMP(mp) ((USHORT)(ULONG)(mp))
#define SHORT2FROMMP(mp) ((USHORT)((ULONG)mp >> 16))
#define LONGFROMMP(mp) ((ULONG)(mp))
#define MRFROMP(p) ((MRESULT)(VOID FAR *)(p))
#define MRFROMSHORT(s) ((MRESULT)(USHORT)(s))
#define MRFROM2SHORT(s1, s2)((MRESULT)MAKELONG(s1, s2))
#define MRFROMLONG(l) ((MRESULT)(ULONG)(l))
#define PVOIDFROMMR(mr) ((VOID FAR *)(mr))
#define SHORT1FROMMR(mr) ((USHORT)((ULONG)mr))
#define SHORT2FROMMR(mr) ((USHORT)((ULONG)mr >> 16))
#define LONGFROMMR(mr) ((ULONG)(mr))
#define HWND_DESKTOP (HWND)1
#define HWND_OBJECT (HWND)2
#define HWND_TOP (HWND)3
#define HWND_BOTTOM (HWND)4
#define HWND_THREADCAPTURE (HWND)5
#define WS_VISIBLE 0x80000000L
#define WS_DISABLED 0x40000000L
#define WS_CLIPCHILDREN 0x20000000L
#define WS_CLIPSIBLINGS 0x10000000L
#define WS_PARENTCLIP 0x08000000L
#define WS_SAVEBITS 0x04000000L
#define WS_SYNCPAINT 0x02000000L
#define WS_MINIMIZED 0x01000000L
#define WS_MAXIMIZED 0x00800000L
#define WS_GROUP 0x00010000L
#define WS_TABSTOP 0x00020000L
#define WS_MULTISELECT 0x00040000L
#define CS_MOVENOTIFY 0x00000001L
#define CS_SIZEREDRAW 0x00000004L
#define CS_HITTEST 0x00000008L
#define CS_PUBLIC 0x00000010L
#define CS_FRAME 0x00000020L
#define CS_CLIPCHILDREN 0x20000000L
#define CS_CLIPSIBLINGS 0x10000000L
#define CS_PARENTCLIP 0x08000000L
#define CS_SAVEBITS 0x04000000L
#define CS_SYNCPAINT 0x02000000L
typedef LHANDLE HWND, FAR *PHWND;
typedef LHANDLE HAB;
typedef LHANDLE HPOINTER;
typedef VOID FAR *MPARAM;
typedef MPARAM FAR *PMPARAM;
typedef VOID FAR *MRESULT;
typedef MRESULT FAR *PMRESULT;
typedef MRESULT (PASCAL FAR *PFNWP)(HWND,USHORT,MPARAM,MPARAM);
#if defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)
#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 0x0001
#define SW_INVALIDATERGN 0x0002
#define QV_OS2 0x0000
#define QV_CMS 0x0001
#define QV_TSO 0x0002
#define QV_TSOBATCH 0x0003
#define QV_OS400 0x0004
typedef struct _QVERSDATA {
USHORT environment;
USHORT version;
} QVERSDATA, FAR *PQVERSDATA;
HPS APIENTRY WinBeginPaint(HWND,HPS,PRECTL);
MRESULT APIENTRY WinDefWindowProc(HWND,USHORT,MPARAM,MPARAM);
BOOL APIENTRY WinDestroyWindow(HWND);
BOOL APIENTRY WinEndPaint(HPS);
BOOL APIENTRY WinFillRect(HPS,PRECTL,LONG);
HPS APIENTRY WinGetClipPS(HWND,HWND,USHORT);
HPS APIENTRY WinGetPS(HWND);
HAB APIENTRY WinInitialize(USHORT);
BOOL APIENTRY WinIsWindowShowing(HWND);
HDC APIENTRY WinOpenWindowDC(HWND);
HAB APIENTRY WinQueryAnchorBlock(HWND);
ULONG APIENTRY WinQueryVersion(HAB);
BOOL APIENTRY WinQueryWindowRect(HWND,PRECTL);
BOOL APIENTRY WinRegisterClass(HAB,PSZ,PFNWP,ULONG,USHORT);
BOOL APIENTRY WinReleasePS(HPS);
SHORT APIENTRY WinScrollWindow(HWND,SHORT,SHORT,PRECTL,PRECTL,HRGN,PRECTL,USHORT);
BOOL APIENTRY WinShowWindow(HWND,BOOL);
BOOL APIENTRY WinTerminate(HAB);
#endif
#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 0x00010000L
#define AWP_MAXIMIZED 0x00020000L
#define AWP_RESTORED 0x00040000L
#define AWP_ACTIVATE 0x00080000L
#define AWP_DEACTIVATE 0x00100000L
#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 DBM_NORMAL 0x0000
#define DBM_INVERT 0x0001
#define DBM_HALFTONE 0x0002
#define DBM_STRETCH 0x0004
#define DBM_IMAGEATTRS 0x0008
#define DT_LEFT 0x0000
#define DT_EXTERNALLEADING 0x0080
#define DT_CENTER 0x0100
#define DT_RIGHT 0x0200
#define DT_TOP 0x0000
#define DT_VCENTER 0x0400
#define DT_BOTTOM 0x0800
#define DT_HALFTONE 0x1000
#define DT_MNEMONIC 0x2000
#define DT_WORDBREAK 0x4000
#define DT_ERASERECT 0x8000
#define DT_QUERYEXTENT 0x0002
#define DT_TEXTATTRS 0x0040
#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 {
USHORT fs;
SHORT cy;
SHORT cx;
SHORT y;
SHORT x;
HWND hwndInsertBehind;
HWND hwnd;
} SWP, FAR *PSWP;
HWND APIENTRY WinCreateWindow(HWND,PSZ,PSZ,ULONG,SHORT,SHORT,SHORT,
SHORT,HWND,HWND,USHORT,PVOID,PVOID);
BOOL APIENTRY WinDrawBitmap(HPS,HBITMAP,PRECTL,PPOINTL,LONG,LONG,USHORT);
BOOL APIENTRY WinDrawBorder(HPS,PRECTL,SHORT,SHORT,LONG,LONG,USHORT);
SHORT APIENTRY WinDrawText(HPS,SHORT,PCH,PRECTL,LONG,LONG,USHORT);
BOOL APIENTRY WinEnableWindow(HWND,BOOL);
BOOL APIENTRY WinEnableWindowUpdate(HWND,BOOL);
SHORT APIENTRY WinLoadMessage(HAB,HMODULE,USHORT,SHORT,PSZ);
SHORT APIENTRY WinLoadString(HAB,HMODULE,USHORT,SHORT,PSZ);
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 WinIsWindowVisible(HWND);
SHORT APIENTRY WinMultWindowFromIDs(HWND,PHWND,USHORT,USHORT);
HWND APIENTRY WinQueryWindow(HWND,SHORT,BOOL);
BOOL APIENTRY WinQueryWindowPos(HWND,PSWP);
SHORT APIENTRY WinQueryWindowText(HWND,SHORT,PCH);
SHORT APIENTRY WinQueryWindowTextLength(HWND);
BOOL APIENTRY WinSetMultWindowPos(HAB,PSWP,USHORT);
BOOL APIENTRY WinSetOwner(HWND,HWND);
BOOL APIENTRY WinSetParent(HWND,HWND,BOOL);
BOOL APIENTRY WinSetWindowPos(HWND,HWND,SHORT,SHORT,SHORT,SHORT,USHORT);
BOOL APIENTRY WinSetWindowText(HWND,PSZ);
HWND APIENTRY WinQueryDesktopWindow(HAB,HDC);
HWND APIENTRY WinQueryObjectWindow(HWND);
BOOL APIENTRY WinQueryWindowProcess(HWND,PPID,PTID);
BOOL APIENTRY WinUpdateWindow(HWND);
HWND APIENTRY WinWindowFromID(HWND,USHORT);
#if defined(INCL_WINWINDOWMGR) || !defined(INCL_NOCOMMON)
BOOL APIENTRY WinSetActiveWindow(HWND,HWND);
#endif
#ifdef INCL_WINWINDOWMGR
#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_MIN (-4)
#define QWL_HHEAP 0x0004
#define QWL_HWNDFOCUSSAVE 0x0018
#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 _CREATESTRUCT {
PVOID pPresParams;
PVOID pCtlData;
USHORT id;
HWND hwndInsertBehind;
HWND hwndOwner;
SHORT cy;
SHORT cx;
SHORT y;
SHORT x;
ULONG flStyle;
PSZ pszText;
PSZ pszClass;
HWND hwndParent;
} CREATESTRUCT, FAR *PCREATESTRUCT;
typedef struct _CLASSINFO {
ULONG flClassStyle;
PFNWP pfnWindowProc;
USHORT cbWindowData;
} CLASSINFO, FAR *PCLASSINFO;
HENUM APIENTRY WinBeginEnumWindows(HWND);
BOOL APIENTRY WinEndEnumWindows(HENUM);
SHORT APIENTRY WinExcludeUpdateRegion(HPS,HWND);
HWND APIENTRY WinGetNextWindow(HENUM);
HPS APIENTRY WinGetScreenPS(HWND);
BOOL APIENTRY WinIsThreadActive(HAB);
BOOL APIENTRY WinLockVisRegions(HWND,BOOL);
HWND APIENTRY WinLockWindow(HWND,BOOL);
BOOL APIENTRY WinLockWindowUpdate(HWND,HWND);
BOOL APIENTRY WinMapWindowPoints(HWND,HWND,PPOINTL,SHORT);
HWND APIENTRY WinQueryActiveWindow(HWND,BOOL);
BOOL APIENTRY WinQueryClassInfo(HAB,PSZ,PCLASSINFO);
SHORT APIENTRY WinQueryClassName(HWND,SHORT,PCH);
HWND APIENTRY WinQuerySysModalWindow(HWND,BOOL);
BOOL APIENTRY WinQueryUpdateRect(HWND,PRECTL);
SHORT APIENTRY WinQueryUpdateRegion(HWND,HRGN);
HDC APIENTRY WinQueryWindowDC(HWND);
SHORT APIENTRY WinQueryWindowLockCount(HWND);
PVOID APIENTRY WinQueryWindowPtr(HWND,SHORT);
USHORT APIENTRY WinQueryWindowUShort(HWND,SHORT);
ULONG APIENTRY WinQueryWindowULong(HWND,SHORT);
BOOL APIENTRY WinRegisterWindowDestroy(HWND,BOOL);
BOOL APIENTRY WinSetSysModalWindow(HWND,HWND);
BOOL APIENTRY WinSetWindowBits(HWND,SHORT,ULONG,ULONG);
BOOL APIENTRY WinSetWindowPtr(HWND,SHORT,PVOID);
BOOL APIENTRY WinSetWindowULong(HWND,SHORT,ULONG);
BOOL APIENTRY WinSetWindowUShort(HWND,SHORT,USHORT);
PFNWP APIENTRY WinSubclassWindow(HWND,PFNWP);
BOOL APIENTRY WinValidateRect(HWND,PRECTL,BOOL);
BOOL APIENTRY WinValidateRegion(HWND,HRGN,BOOL);
HWND APIENTRY WinWindowFromPoint(HWND,PPOINTL,BOOL,BOOL);
HWND APIENTRY WinWindowFromDC(HDC);
#endif
#if defined(INCL_WINMESSAGEMGR) || !defined(INCL_NOCOMMON)
#define CMDSRC_PUSHBUTTON 1
#define CMDSRC_MENU 2
#define CMDSRC_ACCELERATOR 3
#define CMDSRC_OTHER 0
#define PM_REMOVE 1
#define PM_NOREMOVE 0
#define RUM_IN 1
#define RUM_OUT 2
#define RUM_INOUT 3
#define SMD_DELAYED 1
#define SMD_IMMEDIATE 2
#define SSM_SYNCHRONOUS 1
#define SSM_ASYNCHRONOUS 2
#define SSM_MIXED 3
#define WM_NULL 0x0000
#define WM_CREATE 0x0001
#define WM_DESTROY 0x0002
#define WM_OTHERWINDOWDESTROYED 0x0003
#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_CONTROLHEAP 0x0039
#define WM_QUERYDLGCODE 0x003a
#define WM_INITDLG 0x003b
#define WM_SUBSTITUTESTRING 0x003c
#define WM_MATCHMNEMONIC 0x003d
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -