RU/2: Форум. Общение пользователей и разработчиков OS/2 (eCS). : WM_BUTTONxCLICK for x=1,2,3


Список сообщений | Написать новое | Ответить на сообщение | Домой Поиск:
Предыдущее сообщение | Следующее сообщение
From : GA
To : yagiza
Subj : WM_BUTTONxCLICK for x=1,2,3

There are three window messages:

1. WM_BUTTON1CLICK

2. WM_BUTTON2CLICK

3. WM_BUTTON3CLICK

To 1.

This message is sent when the user clicks on mouse button 1.

Parameter 1:

POINTS mouse position

Parameter 2:

USHORT Hit test result

HT_NORMAL The message belongs to this window

HT_TRANSPARENT The part of the window underneath the mouse is not visible; keep checking other windows

USHORT Keyboard control code

Reply:

BOOL Message processed? TRUE:FALSE

To 2.

This message is sent when the user clicks on button 2.

Parameter 1:

POINTS Mouse position

Parameter 2:

USHORT Hit test result
USHORT Keyboard control code

Reply:

BOOL Message processed? TRUE:FALSE

To 3:

This message is sent when the user clicks on mouse button 3.

Parameter 1:

POINTS Mouse position

Parameter 2:

USHORT Hit test result
USHORT Keyboard control code

Reply:

BOOL Message processed? TRUE:FALSE

The PM constant definitions in pmwin.h in OS/2 Toolkit v4.5:

This is G o o g l e's cache of pmwin.h.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
To link to or bookmark this page, use the following url:
www.google.com

Google is not affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted:
wm_button1click





/*
OS/2 Presentation Manager window manager include file
for 32-bit development.
*/


#define INCL_WININCLUDED

#ifdef INCL_WIN
#define INCL_WINATOM
#define INCL_WINBUTTONS
#define INCL_WINCLIPBOARD
#define INCL_WINCOUNTRY
#define INCL_WINCURSORS
#define INCL_WINDDE
#define INCL_WINDIALOGS
#define INCL_WINENTRYFIELDS
#define INCL_WINERRORS
#define INCL_WINFRAMECTLS
#define INCL_WINFRAMEMGR
#define INCL_WINHELP
#define INCL_WINHOOKS
#define INCL_WININPUT
#define INCL_WINLISTBOXES
#define INCL_WINMENUS
#define INCL_WINMESSAGEMGR
#define INCL_WINMLE
#define INCL_WINPALETTE
#define INCL_WINPOINTERS
#define INCL_WINPROGRAMLIST
#define INCL_WINRECTANGLES
#define INCL_WINSCROLLBARS
#define INCL_WINSHELLDATA
#define INCL_WINSTATICS
#define INCL_WINSTDDLGS
#define INCL_WINSWITCHLIST
#define INCL_WINSYS
#define INCL_WINTIMER
#define INCL_WINTRACKRECT
#define INCL_WINWINDOWMGR
#else
#ifdef RC_INVOKED
#define INCL_WININPUT
#define INCL_WINDIALOGS
#define INCL_WINSTATICS
#define INCL_WINBUTTONS
#define INCL_WINENTRYFIELDS
#define INCL_WINLISTBOXES
#define INCL_WINMENUS
#define INCL_WINSCROLLBARS
#define INCL_WINFRAMEMGR
#define INCL_WINFRAMECTLS
#define INCL_WINACCELERATORS
#define INCL_WINPOINTERS
#define INCL_WINMESSAGEMGR
#define INCL_WINMLE
#define INCL_WINHELP
#define INCL_WINSTDDLGS
#define INCL_WINSYS
#endif
#endif

#ifdef INCL_ERRORS
#define INCL_WINERRORS
#endif

#define MPVOID ((MPARAM)0)
#define MPFROMP(p) ((MPARAM)(VOID *)(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 *)(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 *)(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 *)(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 WC_FRAME ((PSZ)0xffff0001)
#define WC_COMBOBOX ((PSZ)0xffff0002)
#define WC_BUTTON ((PSZ)0xffff0003)
#define WC_MENU ((PSZ)0xffff0004)
#define WC_STATIC ((PSZ)0xffff0005)
#define WC_ENTRYFIELD ((PSZ)0xffff0006)
#define WC_LISTBOX ((PSZ)0xffff0007)
#define WC_SCROLLBAR ((PSZ)0xffff0008)
#define WC_TITLEBAR ((PSZ)0xffff0009)
#define WC_MLE ((PSZ)0xffff000A)
#define WC_APPSTAT ((PSZ)0xffff0010)
#define WC_KBDSTAT ((PSZ)0xffff0011)
#define WC_PECIC ((PSZ)0xffff0012)
#define WC_DBE_KKPOPUP ((PSZ)0xffff0013)
#define WC_SPINBUTTON ((PSZ)0xffff0020)
#define WC_CONTAINER ((PSZ)0xffff0025)
#define WC_SLIDER ((PSZ)0xffff0026)
#define WC_VALUESET ((PSZ)0xffff0027)
#define WC_NOTEBOOK ((PSZ)0xffff0028)
#define WC_PENFIRST ((PSZ)0xffff0029)
#define WC_PENLAST ((PSZ)0xffff002C)
#define WC_MMPMFIRST ((PSZ)0xffff0040)
#define WC_CIRCULARSLIDER ((PSZ)0xffff0041)
#define WC_MMPMLAST ((PSZ)0xffff004f)
#define WC_PRISTDDLGFIRST ((PSZ)0xffff0050)
#define WC_PRISTDDLGLAST ((PSZ)0xffff0057)
#define WC_PUBSTDDLGFIRST ((PSZ)0xffff0058)
#define WC_PUBSTDDLGLAST ((PSZ)0xffff005f)

#define WS_VISIBLE 0x80000000
#define WS_DISABLED 0x40000000
#define WS_CLIPCHILDREN 0x20000000
#define WS_CLIPSIBLINGS 0x10000000
#define WS_PARENTCLIP 0x08000000
#define WS_SAVEBITS 0x04000000
#define WS_SYNCPAINT 0x02000000
#define WS_MINIMIZED 0x01000000
#define WS_MAXIMIZED 0x00800000
#define WS_ANIMATE 0x00400000

#define WS_GROUP 0x00010000
#define WS_TABSTOP 0x00020000
#define WS_MULTISELECT 0x00040000

#define CS_MOVENOTIFY 0x00000001
#define CS_SIZEREDRAW 0x00000004
#define CS_HITTEST 0x00000008
#define CS_PUBLIC 0x00000010
#define CS_FRAME 0x00000020
#define CS_SYNCPAINT 0x02000000
#define CS_SAVEBITS 0x04000000
#define CS_PARENTCLIP 0x08000000
#define CS_CLIPSIBLINGS 0x10000000
#define CS_CLIPCHILDREN 0x20000000

#define FM_TYPE_FIXED 0x0001
#define FM_TYPE_LICENSED 0x0002
#define FM_TYPE_KERNING 0x0004
#define FM_TYPE_DBCS 0x0010
#define FM_TYPE_MBCS 0x0018
#define FM_TYPE_UNICODE 0x0040
#define FM_TYPE_64K 0x8000
#define FM_TYPE_ATOMS 0x4000
#define FM_TYPE_FAMTRUNC 0x2000
#define FM_TYPE_FACETRUNC 0x1000

#define FM_DEFN_OUTLINE 0x0001
#define FM_DEFN_IFI 0x0002
#define FM_DEFN_WIN 0x0004
#define FM_DEFN_GENERIC 0x8000

#define FM_DEFN_LATIN1 0x0010
#define FM_DEFN_PC 0x0020
#define FM_DEFN_LATIN2 0x0040
#define FM_DEFN_CYRILLIC 0x0080
#define FM_DEFN_HEBREW 0x0100
#define FM_DEFN_GREEK 0x0200
#define FM_DEFN_ARABIC 0x0400
#define FM_DEFN_UGLEXT 0x0800
#define FM_DEFN_KANA 0x1000
#define FM_DEFN_THAI 0x2000

#define FM_DEFN_UGL383 0x0070
#define FM_DEFN_UGL504 0x00F0
#define FM_DEFN_UGL767 0x0FF0
#define FM_DEFN_UGL1105 0x3FF0

#define FM_SEL_ITALIC 0x0001
#define FM_SEL_UNDERSCORE 0x0002
#define FM_SEL_NEGATIVE 0x0004
#define FM_SEL_OUTLINE 0x0008
#define FM_SEL_STRIKEOUT 0x0010
#define FM_SEL_BOLD 0x0020
#define FM_SEL_ISO9241_TESTED 0x0040

#define FM_SEL_JAPAN 0x1000
#define FM_SEL_TAIWAN 0x2000
#define FM_SEL_CHINA 0x4000
#define FM_SEL_KOREA 0x8000
#define FM_SEL_DBCSMASK 0xF000

#define FM_ISO_9518_640 0x01
#define FM_ISO_9515_640 0x02
#define FM_ISO_9515_1024 0x04
#define FM_ISO_9517_640 0x08
#define FM_ISO_9517_1024 0x10

#define FM_CAP_NOMIX 0x0001
#define FM_CAP_NO_COLOR 0x0002
#define FM_CAP_NO_MIXEDMODES 0x0004
#define FM_CAP_NO_HOLLOW 0x0008

#define FATTR_SEL_ITALIC 0x0001
#define FATTR_SEL_UNDERSCORE 0x0002
#define FATTR_SEL_OUTLINE 0x0008
#define FATTR_SEL_STRIKEOUT 0x0010
#define FATTR_SEL_BOLD 0x0020
#define FATTR_SEL_MUST_COLOR 0x0100
#define FATTR_SEL_MUST_MIXEDMODES 0x0200
#define FATTR_SEL_MUST_HOLLOW 0x0400

#define FATTR_TYPE_KERNING 0x0004
#define FATTR_TYPE_MBCS 0x0008
#define FATTR_TYPE_DBCS 0x0010
#define FATTR_TYPE_ANTIALIASED 0x0020

#define FATTR_FONTUSE_NOMIX 0x0002
#define FATTR_FONTUSE_OUTLINE 0x0004
#define FATTR_FONTUSE_TRANSFORMABLE 0x0008

#define FACESIZE 32

#define WRECT RECTL

typedef LHANDLE HWND, *PHWND;
typedef LHANDLE HAB, *PHAB;

typedef LONG FIXED, *PFIXED;
typedef LONG COLOR, *PCOLOR;
typedef LHANDLE HACCEL;
typedef LHANDLE HBITMAP, *PHBITMAP;
typedef LHANDLE HDC, *PHDC;
typedef LHANDLE HMF, *PHMF;
typedef LHANDLE HPAL, *PHPAL;
typedef LHANDLE HPOINTER, *PHPOINTER;
typedef LHANDLE HPS, *PHPS;
typedef LHANDLE HRGN, *PHRGN;
typedef VOID *MPARAM, **PMPARAM;
typedef VOID *MRESULT, **PMRESULT;

typedef CHAR STR8[8];
typedef STR8 *PSTR8;

typedef MRESULT (APIENTRY FNWP)(HWND, ULONG, MPARAM, MPARAM);
typedef FNWP *PFNWP;

typedef struct _MATRIXLF {
FIXED fxM11;
FIXED fxM12;
LONG lM13;
FIXED fxM21;
FIXED fxM22;
LONG lM23;
LONG lM31;
LONG lM32;
LONG lM33;
} MATRIXLF, *PMATRIXLF;

typedef struct _POINTL {
LONG x;
LONG y;
} POINTL, *PPOINTL;

typedef struct _POINTS {
SHORT x;
SHORT y;
} POINTS, *PPOINTS;

typedef struct _RECTL {
LONG xLeft;
LONG yBottom;
LONG xRight;
LONG yTop;
} RECTL, *PRECTL;

typedef struct _FATTRS {
USHORT usRecordLength;
USHORT fsSelection;
LONG lMatch;
CHAR szFacename[FACESIZE];
USHORT idRegistry;
USHORT usCodePage;
LONG lMaxBaselineExt;
LONG lAveCharWidth;
USHORT fsType;
USHORT fsFontUse;
} FATTRS, *PFATTRS;

typedef struct _PANOSE {
BYTE bFamilyType;
BYTE bSerifStyle;
BYTE bWeight;
BYTE bProportion;
BYTE bContrast;
BYTE bStrokeVariation;
BYTE bArmStyle;
BYTE bLetterform;
BYTE bMidline;
BYTE bXHeight;
BYTE fbPassedISO;
BYTE fbFailedISO;
} PANOSE, *PPANOSE;

typedef struct _FONTMETRICS {
CHAR szFamilyname[FACESIZE];
CHAR szFacename[FACESIZE];
USHORT idRegistry;
USHORT usCodePage;
LONG lEmHeight;
LONG lXHeight;
LONG lMaxAscender;
LONG lMaxDescender;
LONG lLowerCaseAscent;
LONG lLowerCaseDescent;
LONG lInternalLeading;
LONG lExternalLeading;
LONG lAveCharWidth;
LONG lMaxCharInc;
LONG lEmInc;
LONG lMaxBaselineExt;
SHORT sCharSlope;
SHORT sInlineDir;
SHORT sCharRot;
USHORT usWeightClass;
USHORT usWidthClass;
SHORT sXDeviceRes;
SHORT sYDeviceRes;
SHORT sFirstChar;
SHORT sLastChar;
SHORT sDefaultChar;
SHORT sBreakChar;
SHORT sNominalPointSize;
SHORT sMinimumPointSize;
SHORT sMaximumPointSize;
USHORT fsType;
USHORT fsDefn;
USHORT fsSelection;
USHORT fsCapabilities;
LONG lSubscriptXSize;
LONG lSubscriptYSize;
LONG lSubscriptXOffset;
LONG lSubscriptYOffset;
LONG lSuperscriptXSize;
LONG lSuperscriptYSize;
LONG lSuperscriptXOffset;
LONG lSuperscriptYOffset;
LONG lUnderscoreSize;
LONG lUnderscorePosition;
LONG lStrikeoutSize;
LONG lStrikeoutPosition;
SHORT sKerningPairs;
SHORT sFamilyClass;
LONG lMatch;
LONG FamilyNameAtom;
LONG FaceNameAtom;
PANOSE panose;
} FONTMETRICS, *PFONTMETRICS;

#if defined(INCL_WINATOM)

typedef ULONG ATOM;
typedef LHANDLE HATOMTBL;

ATOM APIENTRY WinAddAtom(HATOMTBL hatomtblAtomTbl, PCSZ AtomName);
ATOM APIENTRY WinFindAtom(HATOMTBL hatomtblAtomTbl, PCSZ pszAtomName);

#endif

#if defined(INCL_WINBUTTONS)

#define BS_PUSHBUTTON 0
#define BS_CHECKBOX 1
#define BS_AUTOCHECKBOX 2
#define BS_RADIOBUTTON 3
#define BS_AUTORADIOBUTTON 4
#define BS_3STATE 5
#define BS_AUTO3STATE 6
#define BS_USERBUTTON 7
#define BS_NOTEBOOKBUTTON 8
#define BS_PRIMARYSTYLES 0x000F

#define BS_TEXT 0x0010
#define BS_MINIICON 0x0020
#define BS_BITMAP 0x0040
#define BS_ICON 0x0080
#define BS_HELP 0x0100
#define BS_SYSCOMMAND 0x0200
#define BS_DEFAULT 0x0400
#define BS_NOPOINTERFOCUS 0x0800
#define BS_NOBORDER 0x1000
#define BS_NOCURSORSELECT 0x2000
#define BS_AUTOSIZE 0x4000

#define BN_CLICKED 1
#define BN_DBLCLICKED 2
#define BN_PAINT 3

#define BDS_HILITED 0x0100
#define BDS_DISABLED 0x0200
#define BDS_DEFAULT 0x0400

#define BM_CLICK 0x0120
#define BM_QUERYCHECKINDEX 0x0121
#define BM_QUERYHILITE 0x0122
#define BM_SETHILITE 0x0123
#define BM_QUERYCHECK 0x0124
#define BM_SETCHECK 0x0125
#define BM_SETDEFAULT 0x0126
#define BM_AUTOSIZE 0x0128

#pragma pack(2)

typedef struct _BTNCDATA {
USHORT cb;
USHORT fsCheckState;
USHORT fsHiliteState;
LHANDLE hImage;
} BTNCDATA, *PBTNCDATA;

#pragma pack()

typedef struct _USERBUTTON {
HWND hwnd;
HPS hps;
ULONG fsState;
ULONG fsStateOld;
} USERBUTTON, *PUSERBUTTON;

#endif

#if defined(INCL_WINCLIPBOARD)

#define CF_TEXT 1
#define CF_BITMAP 2
#define CF_DSPTEXT 3
#define CF_DSPBITMAP 4
#define CF_METAFILE 5
#define CF_DSPMETAFILE 6
#define CF_PALETTE 9
#define CF_MMPMFIRST 10
#define CF_MMPMLAST 19

#define CFI_OWNERFREE 0x0001
#define CFI_OWNERDISPLAY 0x0002
#define CFI_POINTER 0x0400
#define CFI_HANDLE 0x0200

#define WM_RENDERFMT 0x0060
#define WM_RENDERALLFMTS 0x0061
#define WM_DESTROYCLIPBOARD 0x0062
#define WM_PAINTCLIPBOARD 0x0063
#define WM_SIZECLIPBOARD 0x0064
#define WM_HSCROLLCLIPBOARD 0x0065
#define WM_VSCROLLCLIPBOARD 0x0066
#define WM_DRAWCLIPBOARD 0x0067

BOOL APIENTRY WinCloseClipbrd(HAB hab);
BOOL APIENTRY WinEmptyClipbrd(HAB hab);
BOOL APIENTRY WinOpenClipbrd(HAB hab);
ULONG APIENTRY WinQueryClipbrdData(HAB hab, ULONG fmt);
BOOL APIENTRY WinQueryClipbrdFmtInfo(HAB hab, ULONG fmt, PULONG prgfFmtInfo);
HWND APIENTRY WinQueryClipbrdOwner(HAB hab);
HWND APIENTRY WinQueryClipbrdViewer(HAB hab);
BOOL APIENTRY WinSetClipbrdData(HAB hab, ULONG ulh, ULONG ulfmt, ULONG flFmtInfo);
BOOL APIENTRY WinSetClipbrdOwner(HAB hab, HWND hwnd);
BOOL APIENTRY WinSetClipbrdViewer(HAB hab, HWND hwndNewClipViewer);

#endif

#if defined(INCL_WINCURSORS)

BOOL APIENTRY WinShowCursor(HWND hwnd, BOOL fShow);

#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 hwnd, HPS hps, PRECTL prclPaint);
BOOL A





Fri 06 Feb 2004 17:22 Mozilla/4.61 [en] (OS/2; U)




Programmed by Dmitri Maximovich, Dmitry I. Platonoff, Eugen Kuleshov.
25.09.99 (c) 1999, RU/2. All rights reserved.
Rewritten by Dmitry Ban. All rights ignored.