From 0b8444d0eef50d1ee4e0d0b51e174fa5b447d802 Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期三, 17 七月 2024 17:50:35 +0800 Subject: [PATCH] base code --- jrj/xframe/wobject/xbase.hpp | 196 ++++++++++++++++++++++++++---------------------- 1 files changed, 105 insertions(+), 91 deletions(-) diff --git a/jrj/xframe/wobject/xbase.hpp b/jrj/xframe/wobject/xbase.hpp index 532c6ac..7dd81c3 100644 --- a/jrj/xframe/wobject/xbase.hpp +++ b/jrj/xframe/wobject/xbase.hpp @@ -38,7 +38,13 @@ NMHDR* pNMHDR; }; */ +struct xstruct +{ +}; + + +#ifdef _XWIN typedef unsigned int UINT; typedef struct NMHDR @@ -48,67 +54,9 @@ int code; } * LPNMHDR; -typedef struct tagEvent -{ - HWND hWnd; - DWORD message; - WPARAM wParam; - LPARAM lParam; - DWORD time; - POINT pt; - union - { - struct { - int wmId ; - int wmEvent ; - HWND hCtrl ; - }command; - struct - { - LPTSTR pStrID; - void * pCmdFrom; - }xcommand; - struct { - UINT nFlags; - POINT point; - } mouse; - struct { - UINT nFlags; - POINT point; - } size; - struct { - UINT nChar; - UINT nRepCnt; - UINT nFlags; - }key; - struct { - HDC hdc; - }paint; - struct { - HWND hWnd ; - UINT nHitTest; - UINT mouseMsg; - }cursor; - struct { - UINT nSBCode; - UINT nPos; - HWND hWndCtl; - }scroll; - struct { - POINT point; - UINT_PTR fwKeys; - short zDelta; - }wheel; - struct { - int idCtrl; - LPNMHDR pnmh; - }notify; - }; - void * pSrcObject; - LPARAM dwRet; -} TEvent; -typedef TEvent TNotifyEvent; + +//typedef TEvent TNotifyEvent; /* struct TEvent { @@ -189,43 +137,47 @@ }; */ -struct IMGNNMHDR : public NMHDR -{ - string path; - string text; - int nIndex; -}; -struct PAGENMHDR : public NMHDR +typedef struct _OVERLAPPED { + ULONG_PTR Internal; + ULONG_PTR InternalHigh; + union { + struct { + DWORD Offset; + DWORD OffsetHigh; + } DUMMYSTRUCTNAME; + LPVOID Pointer; + } DUMMYUNIONNAME; + + HANDLE hEvent; +} OVERLAPPED, * LPOVERLAPPED; + + +#define OFS_MAXPATHNAME 128 +typedef struct _OFSTRUCT { + BYTE cBytes; + BYTE fFixedDisk; + WORD nErrCode; + WORD Reserved1; + WORD Reserved2; + CHAR szPathName[OFS_MAXPATHNAME]; +} OFSTRUCT; + +#endif + +struct IMGNNMHDR : public NMHDR +{ + string path; + string text; + int nIndex; +}; +struct PAGENMHDR : public NMHDR { int max; int cur; -}; +}; struct LYSNMHDR : public NMHDR { int nSheet; -}; - -struct xstruct -{ -}; - -struct OVERLAPPED : public xstruct -{ - int Internal; - int InternalHigh; - int Offset; - int OffsetHigh; - int hEvent; -}; - -struct OFSTRUCT : public xstruct -{ - int cBytes; - int fFixedDisk; - int nErrCode; - int Reserved1; - int Reserved2; - string szPathName; }; struct CELLNMHDR : public NMHDR @@ -267,4 +219,66 @@ LPTSTR pStr; }; +typedef struct tagEvent +{ + HWND hWnd; + DWORD message; + WPARAM wParam; + LPARAM lParam; + DWORD time; + POINT pt; + union + { + struct { + int wmId; + int wmEvent; + HWND hCtrl; + }command; + struct + { + LPTSTR pStrID; + void* pCmdFrom; + }xcommand; + struct { + UINT nFlags; + POINT point; + } mouse; + struct { + UINT nFlags; + POINT point; + } size; + struct { + UINT nChar; + UINT nRepCnt; + UINT nFlags; + }key; + struct { + HDC hdc; + }paint; + struct { + HWND hWnd; + UINT nHitTest; + UINT mouseMsg; + }cursor; + struct { + UINT nSBCode; + UINT nPos; + HWND hWndCtl; + }scroll; + struct { + POINT point; + UINT_PTR fwKeys; + short zDelta; + }wheel; + struct { + int idCtrl; + LPNMHDR pnmh; + }notify; + }; + void* pSrcObject; + LPARAM dwRet; +} TEvent; +typedef TEvent TNotifyEvent; + + //typedef int FEvent(TEvent * evt, int p); \ No newline at end of file -- Gitblit v1.9.3