[w32api Patch] Missing definitions in commctrl.h and wingdi.h
Ranjit Mathew <[email protected]> Sun, 05 Jan 2003 01:19:59 +0530
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
Hi,
While trying to compile the native code in IBM's SWT, I found
that a few definitions were lacking in some of the MinGW w32api
headers. This patch proposes to add these definitions to those
headers.
Please note that I've added these definitions going by the
description given in "MSDN Oct 2002" - I have not looked at any
vendor's headers.
Checks for the version of IE for NMREBARCHEVRON, etc. are according
to the description given in MSDN.
I have maintained the somewhat dense style of the headers as well
as retained the inconsistent "struct _FOO" v/s "struct tagFOO"
style typedefs - I have gone by what MSDN defines for all the
new definitions.
ChangeLog:
2003-01-04 Ranjit Mathew <[email protected]>
* commctrl.h (TOOLINFOA): Add missing member "lParam".
(NMTTDISPINFO): Define.
(LVHITTESTINFO): Add missing member "iSubItem".
(NMTOOLBAR): Define.
(NMREBARCHEVRON): Define.
* wingdi.h (GRADIENT_RECT): Define.
Patch:
-------------------------------- 8< --------------------------------
--- commctrl.h Sat Jan 4 19:19:32 2003
+++ commctrl.h Sat Jan 4 19:53:06 2003
@@ -1598,4 +1598,7 @@
HINSTANCE hinst;
LPSTR lpszText;
+#if (_WIN32_IE >= 0x0300)
+ LPARAM lParam;
+#endif /* _WIN32_IE >= 0x0300 */
} TOOLINFOA,*PTOOLINFOA,*LPTOOLINFOA;
typedef struct tagTOOLINFOW {
@@ -1632,4 +1635,26 @@
UINT uFlags;
} TOOLTIPTEXTW,*LPTOOLTIPTEXTW;
+typedef struct tagNMTTDISPINFO {
+ NMHDR hdr;
+ LPTSTR lpszText;
+ char szText[80];
+ HINSTANCE hinst;
+ UINT uFlags;
+#if (_WIN32_IE >= 0x0300)
+ LPARAM lParam;
+#endif /* _WIN32_IE >= 0x0300 */
+} NMTTDISPINFO, *LPNMTTDISPINFO;
+#define NMTTDISPINFOA NMTTDISPINFO
+#define LPNMTTDISPINFOA LPNMTTDISPINFO
+typedef struct tagNMTTDISPINFOW {
+ NMHDR hdr;
+ LPWSTR lpszText;
+ WCHAR szText[80];
+ HINSTANCE hinst;
+ UINT uFlags;
+#if (_WIN32_IE >= 0x0300)
+ LPARAM lParam;
+#endif /* _WIN32_IE >= 0x0300 */
+} NMTTDISPINFOW, *LPNMTTDISPINFOW;
typedef struct _UDACCEL {
UINT nSec;
@@ -1695,4 +1720,5 @@
UINT flags;
int iItem;
+ int iSubItem;
} LVHITTESTINFO;
#define _LV_HITTESTINFO _LVHITTESTINFO
@@ -2069,4 +2095,12 @@
DWORD dwRop;
} IMAGELISTDRAWPARAMS,*LPIMAGELISTDRAWPARAMS;
+typedef struct tagNMTOOLBAR {
+ NMHDR hdr;
+ int iItem;
+ TBBUTTON tbButton;
+ int cchText;
+ LPTSTR pszText;
+ RECT rcButton;
+} NMTOOLBAR, *LPNMTOOLBAR;
#endif /* (_WIN32_IE >= 0x0300) */
#if (_WIN32_IE >= 0x0400)
@@ -2097,5 +2131,15 @@
int iBand;
} RBHITTESTINFO,*LPRBHITTESTINFO;
-#endif
+#endif /* (_WIN32_IE >= 0x0400) */
+#if (_WIN32_IE >= 0x0500)
+typedef struct tagNMREBARCHEVRON {
+ NMHDR hdr;
+ UINT uBand;
+ UINT wID;
+ LPARAM lParam;
+ RECT rc;
+ LPARAM lParamNM;
+} NMREBARCHEVRON, *LPNMREBARCHEVRON;
+#endif /* (_WIN32_IE >= 0x0500) */
#define INDEXTOOVERLAYMASK(i) ((i)<<8)
--- wingdi.h Sat Jan 4 19:15:02 2003
+++ wingdi.h Sat Jan 4 19:18:42 2003
@@ -2363,4 +2363,8 @@
COLOR16 Alpha;
} TRIVERTEX, *PTRIVERTEX, *LPTRIVERTEX;
+typedef struct _GRADIENT_RECT {
+ ULONG UpperLeft;
+ ULONG LowerRight;
+} GRADIENT_RECT, *PGRADIENT_RECT;
typedef struct _DISPLAY_DEVICE {
DWORD cb;
-------------------------------- 8< --------------------------------
Sincerely Yours,
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore,
INDIA. Web: http://ranjitmathew.tripod.com/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf