changeset 263:27244095ce14

Fix struct sizes, based on a comparison to the values seen by C apps.
author Frank Benoit <benoit@tionex.de>
date Sat, 26 Jul 2008 02:08:41 +0200
parents 59f6b9f052ff
children a63e2cd5485e
files dwt/internal/win32/OS.d dwt/internal/win32/WINTYPES.d dwt/ole/win32/OleFrame.d dwt/widgets/Control.d dwt/widgets/Decorations.d dwt/widgets/Display.d dwt/widgets/FileDialog.d dwt/widgets/Menu.d dwt/widgets/MenuItem.d dwt/widgets/Shell.d dwt/widgets/TabFolder.d dwt/widgets/Table.d dwt/widgets/TableColumn.d dwt/widgets/ToolBar.d dwt/widgets/ToolTip.d dwt/widgets/Tree.d
diffstat 16 files changed, 505 insertions(+), 340 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/internal/win32/OS.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/internal/win32/OS.d	Sat Jul 26 02:08:41 2008 +0200
@@ -122,6 +122,24 @@
         return lgid & 0x3FF;
     }
 
+    public static int LVITEM_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 1 )) ? LVITEM.sizeof : 40;
+    }
+    public static int MENUITEMINFO_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 0 )) ? MENUITEMINFO.sizeof : 44;
+    }
+    public static int NMLVCUSTOMDRAW_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 1 )) ? NMLVCUSTOMDRAW.sizeof : 60;
+    }
+    public static int NMLVDISPINFO_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 1 )) ? NMLVDISPINFO.sizeof : 52;
+    }
+    public static int OPENFILENAME_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 0 )) ? OPENFILENAME.sizeof : 76;
+    }
+    public static int TOOLINFO_sizeof(){
+        return ( !OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION( 5, 1 )) ? TOOLINFO.sizeof : 44;
+    }
 //     private static int getNOTIFYICONDATAA_V2_SIZE (){
 //         // hm, NOTIFYICONDATAA.dwInfoFlags.offsetof did not compile
 //         return IsWinCE ? NOTIFYICONDATAA.sizeof : cast(int)(&(cast(NOTIFYICONDATAA*)null).dwInfoFlags) + int.sizeof;
--- a/dwt/internal/win32/WINTYPES.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/internal/win32/WINTYPES.d	Sat Jul 26 02:08:41 2008 +0200
@@ -4,6 +4,7 @@
 
 module dwt.internal.win32.WINTYPES;
 
+
 /*
     adopted form tango
     Author:     Trevor Parscal
@@ -123,6 +124,7 @@
 alias wchar* LPWSTR;
 alias wchar* NWPSTR;
 alias WINBOOL* PWINBOOL;
+alias ubyte BOOLEAN;
 alias ubyte* PBOOLEAN;
 alias ubyte* PBYTE;
 alias PCHAR PCCH;
@@ -6451,7 +6453,7 @@
 alias BLOB TBLOB;
 alias BLOB* PBLOB;
 
-struct SHITEMID
+align(1) struct SHITEMID
 {
     USHORT cb;
     ubyte[1 + 0] abID;
@@ -6539,7 +6541,7 @@
 struct FIXED
 {
     ushort fract;
-    int value;
+    short value;
 }
 
 alias FIXED _FIXED;
@@ -7076,9 +7078,10 @@
     UINT CtlID;
     HWND hwndItem;
     UINT itemID1;
-    DWORD itemData1;
+    ULONG_PTR itemData1;
     UINT itemID2;
-    DWORD itemData2;
+    ULONG_PTR itemData2;
+    DWORD dwLocaleId;
 }
 
 alias COMPAREITEMSTRUCT TAGCOMPAREITEMSTRUCT;
@@ -7261,25 +7264,26 @@
 alias LIST_ENTRY TLISTENTRY;
 alias LIST_ENTRY* PLISTENTRY;
 
-struct CRITICAL_SECTION_DEBUG
-{
-    ushort _Type;
-    ushort CreatorBackTraceIndex;
+align(1) struct CRITICAL_SECTION_DEBUG
+{
+    WORD _Type;
+    WORD CreatorBackTraceIndex;
     _CRITICAL_SECTION* CriticalSection;
     LIST_ENTRY ProcessLocksList;
     DWORD EntryCount;
     DWORD ContentionCount;
-    DWORD Depth;
-    PVOID[1 + 4] OwnerBackTrace;
+    DWORD Flags;
+    WORD   CreatorBackTraceIndexHigh;
+    WORD   SpareWORD  ;
 }
 
 alias CRITICAL_SECTION_DEBUG* LPCRITICAL_SECTION_DEBUG;
-alias CRITICAL_SECTION_DEBUG PCRITICAL_SECTION_DEBUG;
+alias CRITICAL_SECTION_DEBUG* PCRITICAL_SECTION_DEBUG;
 alias CRITICAL_SECTION_DEBUG _CRITICAL_SECTION_DEBUG;
 alias CRITICAL_SECTION_DEBUG TCRITICALSECTIONDEBUG;
 alias CRITICAL_SECTION_DEBUG* PCRITICALSECTIONDEBUG;
 
-struct CRITICAL_SECTION
+align(1) struct CRITICAL_SECTION
 {
     PCRITICAL_SECTION_DEBUG DebugInfo;
     LONG LockCount;
@@ -7295,12 +7299,13 @@
 alias CRITICAL_SECTION TCRITICALSECTION;
 alias CRITICAL_SECTION* PCRITICALSECTION;
 
+alias ubyte SECURITY_CONTEXT_TRACKING_MODE;
 struct SECURITY_QUALITY_OF_SERVICE
 {
     DWORD Length;
     SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
-    WINBOOL ContextTrackingMode;
-    ubyte EffectiveOnly;
+    SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
+    BOOLEAN EffectiveOnly;
 }
 
 alias SECURITY_QUALITY_OF_SERVICE* PSECURITY_QUALITY_OF_SERVICE;
@@ -7498,7 +7503,7 @@
 struct DDEADVISE
 {
     ushort flag0;
-    int cfFormat;
+    short cfFormat;
 }
 
 alias DDEADVISE TDDEADVISE;
@@ -7515,7 +7520,7 @@
 struct DDEDATA
 {
     ushort flag0;
-    int cfFormat;
+    short  cfFormat;
     ubyte[1 + 0] Value;
 }
 
@@ -7536,7 +7541,7 @@
 struct DDELN
 {
     ushort flag0;
-    int cfFormat;
+    short cfFormat;
 }
 
 alias DDELN TDDELN;
@@ -7567,7 +7572,7 @@
 struct DDEPOKE
 {
     ushort flag0;
-    int cfFormat;
+    short cfFormat;
     ubyte[1 + 0] Value;
 }
 
@@ -7584,7 +7589,7 @@
 struct DDEUP
 {
     ushort flag0;
-    int cfFormat;
+    short cfFormat;
     ubyte[1 + 0] rgb;
 }
 
@@ -7942,9 +7947,14 @@
     LARGE_INTEGER BytesWritten;
     LARGE_INTEGER ReadTime;
     LARGE_INTEGER WriteTime;
+    LARGE_INTEGER IdleTime;
     DWORD ReadCount;
     DWORD WriteCount;
     DWORD QueueDepth;
+    DWORD SplitCount;
+    LARGE_INTEGER QueryTime;
+    DWORD StorageDeviceNumber;
+    WCHAR StorageManagerName[8];
 }
 
 alias DISK_PERFORMANCE _DISK_PERFORMANCE;
@@ -7955,11 +7965,11 @@
 {
     DWORD style;
     DWORD dwExtendedStyle;
-    int x;
-    int y;
-    int cx;
-    int cy;
-    ushort id;
+    short x;
+    short y;
+    short cx;
+    short cy;
+    WORD id;
 }
 
 alias DLGITEMTEMPLATE* LPDLGITEMTEMPLATE;
@@ -7970,11 +7980,11 @@
 {
     DWORD style;
     DWORD dwExtendedStyle;
-    ushort cdit;
-    int x;
-    int y;
-    int cx;
-    int cy;
+    WORD cdit;
+    short x;
+    short y;
+    short cx;
+    short cy;
 }
 
 alias DLGTEMPLATE* LPDLGTEMPLATE;
@@ -8233,6 +8243,7 @@
     COLORREF crBkColorSrc;
     DWORD iUsageSrc;
     DWORD offBmiSrc;
+    DWORD cbBmiSrc;
     DWORD offBitsSrc;
     DWORD cbBitsSrc;
 }
@@ -8265,7 +8276,7 @@
 alias LONG LCSCSTYPE;
 alias LONG LCSGAMUTMATCH;
 
-struct LOGCOLORSPACE
+struct LOGCOLORSPACEA
 {
     DWORD lcsSignature;
     DWORD lcsVersion;
@@ -8276,7 +8287,26 @@
     DWORD lcsGammaRed;
     DWORD lcsGammaGreen;
     DWORD lcsGammaBlue;
-    TCHAR[1 + MAX_PATH-1] lcsFilename;
+    CHAR[1 + MAX_PATH-1] lcsFilename;
+}
+struct LOGCOLORSPACEW
+{
+    DWORD lcsSignature;
+    DWORD lcsVersion;
+    DWORD lcsSize;
+    LCSCSTYPE lcsCSType;
+    LCSGAMUTMATCH lcsIntent;
+    CIEXYZTRIPLE lcsEndpoints;
+    DWORD lcsGammaRed;
+    DWORD lcsGammaGreen;
+    DWORD lcsGammaBlue;
+    WCHAR[1 + MAX_PATH-1] lcsFilename;
+}
+version(Win32SansUnicode) {
+    alias LOGCOLORSPACEA LOGCOLORSPACE;
+}
+else {
+    alias LOGCOLORSPACEW LOGCOLORSPACE;
 }
 
 alias LOGCOLORSPACE* LPLOGCOLORSPACE;
@@ -8285,11 +8315,10 @@
 alias LOGCOLORSPACE TLOGCOLORSPACEA;
 alias LOGCOLORSPACE* PLOGCOLORSPACE;
 
-struct EMRCREATECOLORSPACE
-{
-    EMR emr;
-    DWORD ihCS;
-    LOGCOLORSPACE lcs;
+struct EMRCREATECOLORSPACE {
+    EMR            emr;
+    DWORD          ihCS;
+    LOGCOLORSPACEA lcs;
 }
 
 alias EMRCREATECOLORSPACE TAGEMRCREATECOLORSPACE;
@@ -8443,8 +8472,8 @@
 struct EXTLOGFONT
 {
     LOGFONT elfLogFont;
-    BCHAR[1 + LF_FULLFACESIZE-1] elfFullName;
-    BCHAR[1 + LF_FACESIZE-1] elfStyle;
+    TCHAR[1 + LF_FULLFACESIZE-1] elfFullName;
+    TCHAR[1 + LF_FACESIZE-1] elfStyle;
     DWORD elfVersion;
     DWORD elfStyleSize;
     DWORD elfMatch;
@@ -8799,7 +8828,7 @@
     EMR emr;
     RECTL rclBounds;
     DWORD cpts;
-    POINTL[1 + 0] apts;
+    POINTS[1 + 0] apts;
 }
 
 alias EMRPOLYLINE16 TAGEMRPOLYLINE16;
@@ -9263,7 +9292,7 @@
 alias ENOLEOPFAILED TENOLEOPFAILED;
 alias ENOLEOPFAILED* PENOLEOPFAILED;
 
-struct ENHMETAHEADER
+align(2) struct ENHMETAHEADER
 {
     DWORD iType;
     DWORD nSize;
@@ -9280,6 +9309,14 @@
     DWORD nPalEntries;
     SIZEL szlDevice;
     SIZEL szlMillimeters;
+//#if (WINVER >= 0x0400)
+    DWORD cbPixelFormat;
+    DWORD offPixelFormat;
+    DWORD bOpenGL;
+//#endif /* WINVER >= 0x0400 */
+//#if (WINVER >= 0x0500)
+    SIZEL szlMicrometers;
+//#endif /* WINVER >= 0x0500 */
 }
 
 alias ENHMETAHEADER* LPENHMETAHEADER;
@@ -9502,6 +9539,7 @@
 }
 
 alias TFINDTEXT _FINDTEXT;
+alias TFINDTEXT FINDTEXT;
 alias TFINDTEXT* PFINDTEXT;
 
 struct FINDTEXTEX
@@ -9669,8 +9707,8 @@
     UINT gmBlackBoxX;
     UINT gmBlackBoxY;
     POINT gmptGlyphOrigin;
-    int gmCellIncX;
-    int gmCellIncY;
+    short gmCellIncX;
+    short gmCellIncY;
 }
 
 alias GLYPHMETRICS* LPGLYPHMETRICS;
@@ -9708,6 +9746,14 @@
     int cchTextMax;
     int fmt;
     LPARAM lParam;
+    // _WIN32_IE >= 0x300
+    int iImage;
+    int iOrder;
+    // _WIN32_IE >= 0x500
+    UINT type;
+    void* pvFilter;
+    // _WIN32_WINNT >= 0x600
+    //UINT state;
 }
 
 alias HD_ITEM _HD_ITEM;
@@ -10074,7 +10120,7 @@
 struct LANA_ENUM
 {
     UCHAR length;
-    UCHAR[1 + MAX_LANA-1] lana;
+    UCHAR[1 + MAX_LANA] lana;
 }
 
 alias LANA_ENUM _LANA_ENUM;
@@ -10162,7 +10208,10 @@
 alias FXPT16DOT16* LPFXPT16DOT16;
 alias FXPT16DOT16 TFXPT16DOT16;
 alias FXPT16DOT16* PFXPT16DOT16;
-alias LARGE_INTEGER LUID;
+struct LUID {
+    DWORD LowPart;
+    LONG  HighPart;
+}
 alias LUID TLUID;
 alias LUID* PLUID;
 
@@ -10180,32 +10229,104 @@
 alias LUID_AND_ATTRIBUTES_ARRAY TLUIDANDATTRIBUTESARRAY;
 alias LUID_AND_ATTRIBUTES_ARRAY* PLUIDANDATTRIBUTESARRAY;
 
-struct LV_COLUMN
-{
+struct LVCOLUMNA {
+    UINT mask;
+    int fmt;
+    int cx;
+    LPSTR pszText;
+    int cchTextMax;
+    int iSubItem;
+    int iImage;
+    //if (_WIN32_IE >= 0x0300)
+    int iOrder;
+    //endif
+    //if (_WIN32_WINNT >= 0x0600)
+    //int cxMin;
+    //int cxDefault;
+    //int cxIdeal;
+    //endif
+}
+struct LVCOLUMNW {
     UINT mask;
     int fmt;
     int cx;
-    LPTSTR pszText;
+    LPWSTR pszText;
     int cchTextMax;
     int iSubItem;
-}
-
+    int iImage;
+    //if (_WIN32_IE >= 0x0300)
+    int iOrder;
+    //endif
+    //if (_WIN32_WINNT >= 0x0600)
+    //int cxMin;
+    //int cxDefault;
+    //int cxIdeal;
+    //endif
+}
+version(Win32SansUnicode){
+    alias LVCOLUMNA LVCOLUMN;
+}else{
+    alias LVCOLUMNW LVCOLUMN;
+}
+alias LVCOLUMN* LPLVCOLUMN;
+alias LVCOLUMN LV_COLUMN;
 alias LV_COLUMN _LV_COLUMN;
 alias LV_COLUMN TLVCOLUMN;
 alias LV_COLUMN* PLVCOLUMN;
 
-struct LV_ITEM
-{
-    UINT mask;
-    int iItem;
-    int iSubItem;
-    UINT state;
-    UINT stateMask;
-    LPTSTR pszText;
-    int cchTextMax;
-    int iImage;
+struct LVITEMA {
+    UINT   mask;
+    int    iItem;
+    int    iSubItem;
+    UINT   state;
+    UINT   stateMask;
+    LPSTR  pszText;
+    int    cchTextMax;
+    int    iImage;
     LPARAM lParam;
-}
+//if (_WIN32_IE >= 0x0300)
+    int iIndent;
+//endif
+//if (_WIN32_WINNT >= 0x560)
+    int iGroupId;
+    UINT cColumns; // tile view columns
+    PUINT puColumns;
+//endif
+//if (_WIN32_WINNT >= 0x0600)
+//    int* piColFmt;
+//    int iGroup;
+//endif
+}
+struct LVITEMW {
+    UINT   mask;
+    int    iItem;
+    int    iSubItem;
+    UINT   state;
+    UINT   stateMask;
+    LPWSTR  pszText;
+    int    cchTextMax;
+    int    iImage;
+    LPARAM lParam;
+//if (_WIN32_IE >= 0x0300)
+    int iIndent;
+//endif
+//if (_WIN32_WINNT >= 0x560)
+    int iGroupId;
+    UINT cColumns; // tile view columns
+    PUINT puColumns;
+//endif
+//if (_WIN32_WINNT >= 0x0600)
+//    int* piColFmt;
+//    int iGroup;
+//endif
+}
+version(Win32SansUnicode){
+    alias LVITEMA LVITEM;
+}else{
+    alias LVITEMW LVITEM;
+}
+alias LVITEM* LPLVITEM;
+alias LVITEM LV_ITEM;
 
 alias LV_ITEM _LV_ITEM;
 alias LV_ITEM TLVITEM;
@@ -10234,18 +10355,24 @@
 alias LV_FINDINFO TLVFINDINFO;
 alias LV_FINDINFO* PLVFINDINFO;
 
-struct LV_HITTESTINFO
+struct LVHITTESTINFO
 {
     POINT pt;
     UINT flags;
     int iItem;
-}
+    int iSubItem;
+//#if _WIN32_WINNT >= 0x0600
+//    int iGroup;
+//#endif
+}
+
+alias LVHITTESTINFO LV_HITTESTINFO;
 
 alias LV_HITTESTINFO _LV_HITTESTINFO;
 alias LV_HITTESTINFO TLVHITTESTINFO;
 alias LV_HITTESTINFO* PLVHITTESTINFO;
 
-struct LV_KEYDOWN
+align(2) struct LV_KEYDOWN
 {
     NMHDR hdr;
     ushort wVKey;
@@ -11003,6 +11130,52 @@
 alias TVITEM TV_ITEM;
 alias TVITEM* PTVITEM;
 
+struct TVITEMEXA {
+    UINT      mask;
+    HTREEITEM hItem;
+    UINT      state;
+    UINT      stateMask;
+    LPSTR     pszText;
+    int       cchTextMax;
+    int       iImage;
+    int       iSelectedImage;
+    int       cChildren;
+    LPARAM    lParam;
+    int       iIntegral;
+//#if (_WIN32_IE >= 0x0600)
+//    UINT      uStateEx;
+//    HWND      hwnd;
+//    int       iExpandedImage;
+//#endif
+}
+struct TVITEMEXW {
+    UINT      mask;
+    HTREEITEM hItem;
+    UINT      state;
+    UINT      stateMask;
+    LPWSTR    pszText;
+    int       cchTextMax;
+    int       iImage;
+    int       iSelectedImage;
+    int       cChildren;
+    LPARAM    lParam;
+    int       iIntegral;
+//#if (_WIN32_IE >= 0x0600)
+//    UINT      uStateEx;
+//    HWND      hwnd;
+//    int       iExpandedImage;
+//#endif
+}
+version(Win32SansUnicode)
+{
+    alias TVITEMEXA TVITEMEX;
+}
+else
+{
+    alias TVITEMEXW TVITEMEX;
+}
+alias TVITEMEX * LPTVITEMEX;
+
 struct NMTREEVIEW
 {
     NMHDR hdr;
@@ -11046,6 +11219,10 @@
     LOGFONTA lfMenuFont;
     LOGFONTA lfStatusFont;
     LOGFONTA lfMessageFont;
+//if (WINVER >= 0x0600)
+//  int iPaddedBorderWidth;
+//endif 
+
 }
 struct NONCLIENTMETRICSW {
     int cbSize;
@@ -11063,6 +11240,9 @@
     LOGFONTW lfMenuFont;
     LOGFONTW lfStatusFont;
     LOGFONTW lfMessageFont;
+//if (WINVER >= 0x0600)
+//  int iPaddedBorderWidth;
+//endif 
 }
 version(Win32SansUnicode)
 {
@@ -11213,6 +11393,11 @@
     DWORD lCustData;
     LPOFNHOOKPROC lpfnHook;
     LPCTSTR lpTemplateName;
+//if (_WIN32_WINNT >= 0x0500)
+  void *        pvReserved;
+  DWORD         dwReserved;
+  DWORD         FlagsEx;
+//endif // (_WIN32_WINNT >= 0x0500)
 }
 
 alias OPENFILENAME* LPOPENFILENAME;
@@ -11269,7 +11454,6 @@
 alias OSVERSIONINFO* POSVERSIONINFO;
 
 struct TEXTMETRICA {
-    align(1):
     LONG tmHeight;
     LONG tmAscent;
     LONG tmDescent;
@@ -11294,7 +11478,6 @@
     BYTE tmCharSet;
 }
 struct TEXTMETRICW {
-    align(1):
     LONG tmHeight;
     LONG tmAscent;
     LONG tmDescent;
@@ -11449,6 +11632,7 @@
     HGLOBAL hPageSetupTemplate;
 }
 
+alias TPAGESETUPDLG PAGESETUPDLG;
 alias TPAGESETUPDLG* LPPAGESETUPDLG;
 alias TPAGESETUPDLG* PPAGESETUPDLG;
 alias TPAGESETUPDLG TAGPSD;
@@ -11619,8 +11803,7 @@
 alias PREVENT_MEDIA_REMOVAL TPREVENTMEDIAREMOVAL;
 alias PREVENT_MEDIA_REMOVAL* PPREVENTMEDIAREMOVAL;
 
-struct PRINTDLGA {  // pd
-    align(2):
+align(2) struct PRINTDLGA {  // pd
     DWORD     lStructSize;
     HWND      hwndOwner;
     HANDLE    hDevMode;
@@ -11643,8 +11826,7 @@
 }
 alias PRINTDLGA* PPRINTDLGA;
 alias PRINTDLGA* LPPRINTDLGA;
-struct PRINTDLGW {  // pd
-    align(2):
+align(2) struct PRINTDLGW {  // pd
     DWORD     lStructSize;
     HWND      hwndOwner;
     HANDLE    hDevMode;
@@ -11888,52 +12070,32 @@
 extern(Windows){alias UINT (*LPFNPSPCALLBACK)(HWND, UINT, LPVOID);}
 alias LPFNPSPCALLBACK TFNPSPCALLBACK;
 
-struct PROPSHEETPAGE_U1
-{
-
-    union
-    {
-        struct
-        {
-            LPCTSTR pszTemplate;
-        }
-        struct
-        {
-            LPCDLGTEMPLATE pResource;
-        }
-    }
-}
-
-
-struct PROPSHEETPAGE_U2
-{
-
-    union
-    {
-        struct
-        {
-            HICON hIcon;
-        }
-        struct
-        {
-            LPCTSTR pszIcon;
-        }
-    }
-}
-
 
 struct PROPSHEETPAGE
 {
     DWORD dwSize;
     DWORD dwFlags;
     HINST hInstance;
-    PROPSHEETPAGE_U1 u1;
-    PROPSHEETPAGE_U2 u2;
+    union {
+        LPCTSTR pszTemplate;
+        LPCDLGTEMPLATE pResource;
+    }
+    union {
+        HICON hIcon;
+        LPCTSTR pszIcon;
+    }
     LPCTSTR pszTitle;
     DLGPROC pfnDlgProc;
     LPARAM lParam;
     LPFNPSPCALLBACK pfnCallback;
     UINT* pcRefParent;
+//if (_WIN32_IE >= 0x0500)
+    LPCTSTR pszHeaderTitle;
+    LPCTSTR pszHeaderSubTitle;
+//endif
+//if (_WIN32_WINNT >= 0x0501)
+    HANDLE hActCtx;
+//endif
 }
 
 alias PROPSHEETPAGE* LPPROPSHEETPAGE;
@@ -12011,6 +12173,17 @@
     PROPSHEETHEADER_U2 u2;
     PROPSHEETHEADER_U3 u3;
     PFNPROPSHEETCALLBACK pfnCallback;
+//if (_WIN32_IE >= 0x0400)
+    union {
+        HBITMAP hbmWatermark;
+        LPCTSTR pszbmWatermark;
+    }
+    HPALETTE hplWatermark;
+    union {
+        HBITMAP hbmHeader; 
+        LPCSTR pszbmHeader;
+    }
+//endif
 }
 
 alias PROPSHEETHEADER* LPPROPSHEETHEADER;
@@ -12182,7 +12355,7 @@
 {
     DWORD dwSize;
     DWORD dwError;
-    TCHAR[1 + (RAS_MaxIpAddress+1)-1] szIpAddress;
+    TCHAR[RAS_MaxIpAddress+1] szIpAddress;
 }
 
 alias RASPPPIP _RASPPPIP;
@@ -12216,9 +12389,9 @@
 
 struct RASTERIZER_STATUS
 {
-    int nSize;
-    int wFlags;
-    int nLanguageID;
+    short nSize;
+    short wFlags;
+    short nLanguageID;
 }
 
 alias RASTERIZER_STATUS* LPRASTERIZER_STATUS;
@@ -12345,6 +12518,7 @@
     LPSTR lpszPort;
     DWORD iBaudRate;
     DWORD iPortState;
+    UINT  iActive;
 }
 
 alias SERIALKEYS* LPSERIALKEYS;
@@ -12459,7 +12633,7 @@
 alias FILEOP_FLAGS TFILEOPFLAGS;
 alias FILEOP_FLAGS* PFILEOPFLAGS;
 
-struct SHFILEOPSTRUCT
+align(2) struct SHFILEOPSTRUCT
 {
     HWND hwnd;
     UINT wFunc;
@@ -12604,7 +12778,7 @@
 struct STYLEBUF
 {
     DWORD dwStyle;
-    char[1 + 31] szDescription;
+    TCHAR[1 + 31] szDescription;
 }
 
 alias STYLEBUF* LPSTYLEBUF;
@@ -12634,36 +12808,23 @@
 alias SYSTEM_AUDIT_ACE TSYSTEMAUDITACE;
 alias SYSTEM_AUDIT_ACE* PSYSTEMAUDITACE;
 
-struct SYSTEM_INFO_U
-{
-
-    union
-    {
-        struct
-        {
-            DWORD dwOemId;
-        }
-        struct
-        {
-            ushort wProcessorArchitecture;
-            ushort wReserved;
+struct SYSTEM_INFO {
+    union {
+        DWORD dwOemId;
+        struct {
+            WORD wProcessorArchitecture;
+            WORD wReserved;
         }
     }
-}
-
-
-struct SYSTEM_INFO
-{
-    SYSTEM_INFO_U u;
     DWORD dwPageSize;
     LPVOID lpMinimumApplicationAddress;
     LPVOID lpMaximumApplicationAddress;
-    DWORD dwActiveProcessorMask;
+    DWORD_PTR dwActiveProcessorMask;
     DWORD dwNumberOfProcessors;
     DWORD dwProcessorType;
     DWORD dwAllocationGranularity;
-    ushort wProcessorLevel;
-    ushort wProcessorRevision;
+    WORD wProcessorLevel;
+    WORD wProcessorRevision;
 }
 
 alias SYSTEM_INFO* LPSYSTEM_INFO;
@@ -12688,7 +12849,8 @@
 
 struct TAPE_ERASE
 {
-    ULONG _Type;
+    DWORD Type;
+    BOOLEAN Immediate;
 }
 
 alias TAPE_ERASE _TAPE_ERASE;
@@ -12741,7 +12903,8 @@
 
 struct TAPE_PREPARE
 {
-    ULONG Operation;
+    DWORD    Operation;
+    BOOLEAN  Immediate;
 }
 
 alias TAPE_PREPARE _TAPE_PREPARE;
@@ -12774,8 +12937,8 @@
 {
     ULONG Method;
     ULONG Partition;
-    ULONG OffsetLow;
-    ULONG OffsetHigh;
+    LARGE_INTEGER Offset;
+    BOOLEAN Immediate;
 }
 
 alias TAPE_SET_POSITION _TAPE_SET_POSITION;
@@ -12786,6 +12949,7 @@
 {
     ULONG _Type;
     ULONG Count;
+    BOOLEAN Immediate;
 }
 
 alias TAPE_WRITE_MARKS _TAPE_WRITE_MARKS;
@@ -12809,9 +12973,9 @@
     BYTE    fsState;
     BYTE    fsStyle;
 //#ifdef _WIN64
-//    BYTE     bReserved[6]     // padding for alignment
+//    BYTE     bReserved[6];     // padding for alignment
 //#elif defined(_WIN32)
-//    BYTE     bReserved[2]     // padding for alignment
+    BYTE     bReserved[2];     // padding for alignment
 //#endif
     DWORD_PTR   dwData;
     INT_PTR     iString;
@@ -12823,14 +12987,32 @@
 alias TBBUTTON TTBBUTTON;
 alias TBBUTTON* PTBBUTTON;
 
-struct TBNOTIFY
-{
-    NMHDR hdr;
-    int iItem;
+struct NMTOOLBARA {
+    align(2):
+    NMHDR    hdr;
+    int      iItem;
     TBBUTTON tbButton;
-    int cchText;
-    LPTSTR pszText;
-}
+    int      cchText;
+    LPSTR   pszText;
+    RECT     rcButton;
+}
+struct NMTOOLBARW {
+    align(2):
+    NMHDR    hdr;
+    int      iItem;
+    TBBUTTON tbButton;
+    int      cchText;
+    LPWSTR   pszText;
+    RECT     rcButton;
+}
+version(Win32SansUnicode){
+    alias NMTOOLBARA NMTOOLBAR;
+}else{
+    alias NMTOOLBARW NMTOOLBAR;
+}
+alias NMTOOLBAR* LPNMTOOLBAR;
+
+alias NMTOOLBAR TBNOTIFY;
 
 alias TBNOTIFY* LPTBNOTIFY;
 alias TBNOTIFY TTBNOTIFY;
@@ -12886,13 +13068,14 @@
 alias TC_ITEMHEADER TTCITEMHEADER;
 alias TC_ITEMHEADER* PTCITEMHEADER;
 
-struct TC_KEYDOWN
+align(1) struct NMTCKEYDOWN
 {
     NMHDR hdr;
-    ushort wVKey;
+    WORD wVKey;
     UINT flags;
 }
 
+alias NMTCKEYDOWN TC_KEYDOWN;
 alias TC_KEYDOWN _TC_KEYDOWN;
 alias TC_KEYDOWN TTCKEYDOWN;
 alias TC_KEYDOWN* PTCKEYDOWN;
@@ -12997,7 +13180,7 @@
 struct TOKEN_PRIVILEGES
 {
     DWORD PrivilegeCount;
-    LUID_AND_ATTRIBUTES[1 + ANYSIZE_ARRAY-1] Privileges;
+    LUID_AND_ATTRIBUTES[ANYSIZE_ARRAY] Privileges;
 }
 
 alias TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES;
@@ -13042,7 +13225,12 @@
     RECT rect;
     HINST hinst;
     LPSTR lpszText;
-    void* lpReserved;
+//if (_WIN32_IE >= 0x0300)
+    LPARAM lParam;
+//endif
+//if (_WIN32_WINNT >= 0x0501)
+    void *lpReserved;
+//endif
 }
 struct TOOLINFOW
 {
@@ -13053,7 +13241,13 @@
     RECT rect;
     HINST hinst;
     LPWSTR lpszText;
-    void* lpReserved;
+//if (_WIN32_IE >= 0x0300)
+    LPARAM lParam;
+//endif
+//if (_WIN32_WINNT >= 0x0501)
+    void *lpReserved;
+//endif
+
 }
 version(Win32SansUnicode)
 {
@@ -13067,22 +13261,32 @@
 alias TOOLINFO TTOOLINFO;
 alias TOOLINFO* PTOOLINFO;
 
-struct TOOLTIPTEXTA
-{
+struct NMTTDISPINFOA {
     NMHDR hdr;
     LPSTR lpszText;
-    CHAR[80] szText;
-    HINST hinst;
+    char szText[80];
+    HINSTANCE hinst;
     UINT uFlags;
-}
-struct TOOLTIPTEXTW
-{
+    LPARAM lParam;
+}
+
+struct NMTTDISPINFOW {
     NMHDR hdr;
     LPWSTR lpszText;
-    WCHAR[80] szText;
-    HINST hinst;
+    WCHAR szText[80];
+    HINSTANCE hinst;
     UINT uFlags;
-}
+    LPARAM lParam;
+}
+version(Win32SansUnicode){
+    alias NMTTDISPINFOA NMTTDISPINFO;
+} else {
+    alias NMTTDISPINFOW NMTTDISPINFO;
+}
+
+
+alias NMTTDISPINFOA TOOLTIPTEXTA;
+alias NMTTDISPINFOW TOOLTIPTEXTW;
 version(Win32SansUnicode)
 {
     alias TOOLTIPTEXTA TOOLTIPTEXT;
@@ -13180,13 +13384,19 @@
 {
     HTREEITEM hParent;
     HTREEITEM hInsertAfter;
-    TVITEMA item;
+    union {
+        TVITEMEXA itemex;
+        TVITEMA item;
+    }
 }
 struct TVINSERTSTRUCTW
 {
     HTREEITEM hParent;
     HTREEITEM hInsertAfter;
-    TVITEMW item;
+    union {
+        TVITEMEXW itemex;
+        TVITEMW item;
+    }
 }
 version(Win32SansUnicode)
 {
@@ -13203,7 +13413,7 @@
 alias TVINSERTSTRUCT TTVINSERTSTRUCT;
 alias TVINSERTSTRUCT* PTVINSERTSTRUCT;
 
-struct TV_KEYDOWN
+align(2) struct TV_KEYDOWN
 {
     NMHDR hdr;
     ushort wVKey;
@@ -13832,6 +14042,7 @@
 alias TVARIANT VARIANT;
 alias int MMRESULT;
 alias TWAVEFORMATEX* PWAVEFORMATEX;
+alias TWAVEFORMATEX WAVEFORMATEX;
 
 align(1) struct TWAVEFORMATEX
 {
@@ -13883,7 +14094,7 @@
 
 alias HANDLE HMONITOR;
 
-struct tagMONITORINFOEX
+struct MONITORINFOEX
 {
     DWORD  cbSize;
     RECT   rcMonitor;
@@ -13891,17 +14102,15 @@
     DWORD  dwFlags;
     TCHAR  szDevice[CCHDEVICENAME];
 }
-alias tagMONITORINFOEX MONITORINFOEX;
 alias MONITORINFOEX* LPMONITORINFOEX;
 
-struct tagMONITORINFO
+struct MONITORINFO
 {
     DWORD  cbSize;
     RECT   rcMonitor;
     RECT   rcWork;
     DWORD  dwFlags;
 }
-alias tagMONITORINFO MONITORINFO;
 alias MONITORINFO* LPMONITORINFO;
 
 struct WINDOWINFO
@@ -14063,6 +14272,8 @@
     NMHDR hdr;
     TVITEM item;
 }
+
+// only on Vista
 struct NMTVITEMCHANGE {
     NMHDR hdr;
     UINT uChanged;
@@ -14521,8 +14732,17 @@
     int     cchTextMax;
     int     fmt;
     LPARAM  lParam;
+//#if (_WIN32_IE >= 0x0300)
     int     iImage;
     int     iOrder;
+//#endif
+//#if (_WIN32_IE >= 0x0500)
+    UINT    type;
+    void    *pvFilter;
+//#endif
+//#if _WIN32_WINNT >= 0x0600
+//    UINT   state;
+//#endif
 }
 struct HDITEMW {
     UINT    mask;
@@ -14532,8 +14752,17 @@
     int     cchTextMax;
     int     fmt;
     LPARAM  lParam;
+//#if (_WIN32_IE >= 0x0300)
     int     iImage;
     int     iOrder;
+//#endif
+//#if (_WIN32_IE >= 0x0500)
+    UINT    type;
+    void    *pvFilter;
+//#endif
+//#if _WIN32_WINNT >= 0x0600
+//    UINT   state;
+//#endif
 }
 version(Win32SansUnicode){
     alias HDITEMA HDITEM;
@@ -14588,32 +14817,6 @@
 // }
 
 
-struct LVCOLUMNA {
-    UINT mask;
-    int fmt;
-    int cx;
-    LPSTR pszText;
-    int cchTextMax;
-    int iSubItem;
-    int iImage;
-    int iOrder;
-}
-struct LVCOLUMNW {
-    UINT mask;
-    int fmt;
-    int cx;
-    LPWSTR pszText;
-    int cchTextMax;
-    int iSubItem;
-    int iImage;
-    int iOrder;
-}
-version(Win32SansUnicode){
-    alias LVCOLUMNA LVCOLUMN;
-}else{
-    alias LVCOLUMNW LVCOLUMN;
-}
-alias LVCOLUMN* LPLVCOLUMN;
 
 struct LVFINDINFOA {
     UINT flags;
@@ -14638,45 +14841,6 @@
     alias LVFINDINFOW LVFINDINFO;
 }
 
-struct LVHITTESTINFO
-{
-    POINT pt;
-    UINT flags;
-    int iItem;
-    int iSubItem;
-}
-
-
-struct LVITEMA {
-    UINT   mask;
-    int    iItem;
-    int    iSubItem;
-    UINT   state;
-    UINT   stateMask;
-    LPSTR  pszText;
-    int    cchTextMax;
-    int    iImage;
-    LPARAM lParam;
-    int iIndent;
-}
-struct LVITEMW {
-    UINT   mask;
-    int    iItem;
-    int    iSubItem;
-    UINT   state;
-    UINT   stateMask;
-    LPWSTR  pszText;
-    int    cchTextMax;
-    int    iImage;
-    LPARAM lParam;
-    int iIndent;
-}
-version(Win32SansUnicode){
-    alias LVITEMA LVITEM;
-}else{
-    alias LVITEMW LVITEM;
-}
-alias LVITEM* LPLVITEM;
 
 struct MARGINS {
     int cxLeftWidth;
@@ -14690,9 +14854,12 @@
   RECT  rcBar;
   HMENU hMenu;
   HWND  hwndMenu;
-  BOOL  fBarFocused;
-  BOOL  fFocused;
-}alias MENUBARINFO* PMENUBARINFO, LPMENUBARINFO;
+  BOOL  flags;
+    //fBarFocused : 1;
+    //fFocused    : 1;
+}
+alias MENUBARINFO* PMENUBARINFO;
+alias MENUBARINFO* LPMENUBARINFO;
 
 struct MENUINFO {
   DWORD   cbSize;
@@ -14882,6 +15049,18 @@
 //#if (_WIN32_IE >= 0x0400)
     int iSubItem;
 //#endif
+//if (_WIN32_IE >= 0x560)
+    DWORD dwItemType;
+    // Item Custom Draw	
+    COLORREF clrFace;
+    int iIconEffect;
+    int iIconPhase;
+    int iPartId;
+    int iStateId;
+    // Group Custom Draw
+    RECT rcText;
+    UINT uAlign;
+//endif
 }
 
 struct NMLVDISPINFOA {
@@ -14935,52 +15114,7 @@
     int y;
     int dwItemSpec;
 }
-struct NMTOOLBARA {
-    align(2):
-    NMHDR    hdr;
-    int      iItem;
-    TBBUTTON tbButton;
-    int      cchText;
-    LPSTR   pszText;
-}
-struct NMTOOLBARW {
-    align(2):
-    NMHDR    hdr;
-    int      iItem;
-    TBBUTTON tbButton;
-    int      cchText;
-    LPWSTR   pszText;
-}
-version(Win32SansUnicode){
-    alias NMTOOLBARA NMTOOLBAR;
-}else{
-    alias NMTOOLBARW NMTOOLBAR;
-}
-alias NMTOOLBAR* LPNMTOOLBAR;
-
-
-struct NMTTDISPINFOA {
-    NMHDR hdr;
-    LPSTR lpszText;
-    char szText[80];
-    HINSTANCE hinst;
-    UINT uFlags;
-    LPARAM lParam;
-}
-
-struct NMTTDISPINFOW {
-    NMHDR hdr;
-    LPWSTR lpszText;
-    WCHAR szText[80];
-    HINSTANCE hinst;
-    UINT uFlags;
-    LPARAM lParam;
-}
-version(Win32SansUnicode){
-    alias NMTTDISPINFOA NMTTDISPINFO;
-} else {
-    alias NMTTDISPINFOW NMTTDISPINFO;
-}
+
 
 struct NMTVCUSTOMDRAW {
     NMCUSTOMDRAW nmcd;
@@ -15009,8 +15143,8 @@
     };
     char szInfoTitle[64] = '\0';
     DWORD dwInfoFlags;
-    //GUID guidItem;
-    //HICON hBalloonIcon;
+    GUID guidItem;
+    HICON hBalloonIcon;
 } alias NOTIFYICONDATAA* PNOTIFYICONDATAA, LPNOTIFYICONDATAA;
 
 struct NOTIFYICONDATAW {
@@ -15030,8 +15164,8 @@
     }
     WCHAR szInfoTitle[64] = '\0';
     DWORD dwInfoFlags;
-    //GUID guidItem;
-    //HICON hBalloonIcon;
+    GUID guidItem;
+    HICON hBalloonIcon;
 }
 
 alias NOTIFYICONDATAW* PNOTIFYICONDATAW, LPNOTIFYICONDATAW;
@@ -15129,6 +15263,7 @@
     UINT        cx;
     HBITMAP     hbmBack;
     UINT        wID;
+//if (_WIN32_IE >= 0x0400)
     UINT        cyChild;
     UINT        cyMaxChild;
     UINT        cyIntegral;
@@ -15136,6 +15271,11 @@
     LPARAM      lParam;
     UINT        cxHeader;
     /* Note in WinCE.  The field cxHeader is not defined. */
+//endif
+//if (_WIN32_WINNT >= 0x0600)
+//    RECT        rcChevronLocation;  
+//    UINT        uChevronState; 
+//endif
 }
 struct REBARBANDINFOW {
     UINT        cbSize;
@@ -15152,6 +15292,7 @@
     UINT        cx;
     HBITMAP     hbmBack;
     UINT        wID;
+//if (_WIN32_IE >= 0x0400)
     UINT        cyChild;
     UINT        cyMaxChild;
     UINT        cyIntegral;
@@ -15159,6 +15300,11 @@
     LPARAM      lParam;
     UINT        cxHeader;
     /* Note in WinCE.  The field cxHeader is not defined. */
+//endif
+//if (_WIN32_WINNT >= 0x0600)
+//    RECT        rcChevronLocation;  
+//    UINT        uChevronState; 
+//endif
 }
 version(Win32SansUnicode){
     alias REBARBANDINFOA REBARBANDINFO;
@@ -15520,6 +15666,7 @@
     LPSTR pszText;
     int cchTextMax;
     int iImage;
+    LPARAM lParam;
 }
 struct TCITEMW {
     UINT mask;
--- a/dwt/ole/win32/OleFrame.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/ole/win32/OleFrame.d	Sat Jul 26 02:08:41 2008 +0200
@@ -399,7 +399,7 @@
 private int getMenuItemID(HMENU hMenu, int index) {
     int id = 0;
     MENUITEMINFO lpmii;
-    lpmii.cbSize = MENUITEMINFO.sizeof;
+    lpmii.cbSize = OS.MENUITEMINFO_sizeof;
     lpmii.fMask = OS.MIIM_STATE | OS.MIIM_SUBMENU | OS.MIIM_ID;
     OS.GetMenuItemInfo(hMenu, index, true, &lpmii);
     if ((lpmii.fState & OS.MF_POPUP) is OS.MF_POPUP) {
@@ -450,7 +450,7 @@
     int cch = 128;
     int byteCount = cch * TCHAR.sizeof;
     auto pszText = cast(TCHAR*) OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
-    lpmii.cbSize = MENUITEMINFO.sizeof;
+    lpmii.cbSize = OS.MENUITEMINFO_sizeof;
     lpmii.fMask = OS.MIIM_STATE | OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_SUBMENU | OS.MIIM_DATA;
     lpmii.dwTypeData = pszText;
     lpmii.cch = cch;
--- a/dwt/widgets/Control.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Control.d	Sat Jul 26 02:08:41 2008 +0200
@@ -4276,7 +4276,7 @@
         if ((code & OS.MF_POPUP) !is 0) {
             int index = OS.LOWORD (wParam);
             MENUITEMINFO info;
-            info.cbSize = MENUITEMINFO.sizeof;
+            info.cbSize = OS.MENUITEMINFO_sizeof;
             info.fMask = OS.MIIM_SUBMENU;
             if (OS.GetMenuItemInfo (cast(HANDLE)lParam, index, true, &info)) {
                 Menu newMenu = menuShell.findMenu (info.hSubMenu);
--- a/dwt/widgets/Decorations.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Decorations.d	Sat Jul 26 02:08:41 2008 +0200
@@ -1304,7 +1304,7 @@
     if ((style & DWT.CLOSE) is 0 || newCount !is oldCount) {
         OS.DeleteMenu (hMenu, OS.SC_TASKLIST, OS.MF_BYCOMMAND);
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         info.fMask = OS.MIIM_ID;
         int index = 0;
         while (index < newCount) {
--- a/dwt/widgets/Display.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Display.d	Sat Jul 26 02:08:41 2008 +0200
@@ -4617,7 +4617,7 @@
             switch (hdr.code) {
                 case OS.LVN_GETDISPINFOA:
                 case OS.LVN_GETDISPINFOW: {
-                    OS.MoveMemory (plvfi, lParam, NMLVDISPINFO.sizeof);
+                    OS.MoveMemory (plvfi, lParam, OS.NMLVDISPINFO_sizeof);
                     if (0 <= plvfi.item.iSubItem && plvfi.item.iSubItem < columnCount) {
                         if (!columnVisible [plvfi.item.iSubItem]) return 0;
                     }
--- a/dwt/widgets/FileDialog.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/FileDialog.d	Sat Jul 26 02:08:41 2008 +0200
@@ -209,7 +209,7 @@
                 if (lResult > 0) {
                     lResult += OS.MAX_PATH;
                     OPENFILENAME* lpofn = ofn.lpOFN;
-                    //OS.MoveMemory (lpofn, ofn.lpOFN, OPENFILENAME.sizeof);
+                    //OS.MoveMemory (lpofn, ofn.lpOFN, OS.OPENFILENAME_sizeof);
                     if (lpofn.nMaxFile < lResult) {
                         auto hHeap = OS.GetProcessHeap ();
                         auto lpstrFile = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, lResult * TCHAR.sizeof);
@@ -217,7 +217,7 @@
                             if (lpofn.lpstrFile !is null) OS.HeapFree (hHeap, 0, lpofn.lpstrFile);
                             lpofn.lpstrFile = lpstrFile;
                             lpofn.nMaxFile = lResult;
-                            //OS.MoveMemory (ofn.lpOFN, lpofn, OPENFILENAME.sizeof);
+                            //OS.MoveMemory (ofn.lpOFN, lpofn, OS.OPENFILENAME_sizeof);
                         }
                     }
               }
@@ -331,7 +331,7 @@
 
     /* Create the file dialog struct */
     OPENFILENAME struct_;
-    struct_.lStructSize = OPENFILENAME.sizeof;
+    struct_.lStructSize = OS.OPENFILENAME_sizeof;
     struct_.Flags = OS.OFN_HIDEREADONLY | OS.OFN_NOCHANGEDIR;
     bool save = (style & DWT.SAVE) !is 0;
     if (save && overwrite) struct_.Flags |= OS.OFN_OVERWRITEPROMPT;
--- a/dwt/widgets/Menu.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Menu.d	Sat Jul 26 02:08:41 2008 +0200
@@ -487,7 +487,7 @@
             success = OS.InsertMenu (handle, index, uFlags, item.id, lpNewItem);
             if (success) {
                 MENUITEMINFO info = new MENUITEMINFO ();
-                info.cbSize = MENUITEMINFO.sizeof;
+                info.cbSize = OS.MENUITEMINFO_sizeof;
                 info.fMask = OS.MIIM_DATA;
                 info.dwItemData = item.id;
                 success = OS.SetMenuItemInfo (handle, index, true, info);
@@ -511,7 +511,7 @@
             auto pszText = cast(TCHAR*) OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);
             OS.MoveMemory (pszText, buffer.ptr, byteCount);
             MENUITEMINFO info;
-            info.cbSize = MENUITEMINFO.sizeof;
+            info.cbSize = OS.MENUITEMINFO_sizeof;
             info.fMask = OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_DATA;
             info.wID = item.id;
             info.dwItemData = item.id;
@@ -582,7 +582,7 @@
         } else {
             int index = 0;
             MENUITEMINFO info;
-            info.cbSize = MENUITEMINFO.sizeof;
+            info.cbSize = OS.MENUITEMINFO_sizeof;
             info.fMask = OS.MIIM_DATA;
             while (OS.GetMenuItemInfo (handle, index, true, &info)) {
                 if (info.dwItemData is item.id) break;
@@ -736,7 +736,7 @@
     int id = OS.GetMenuDefaultItem (handle, OS.MF_BYCOMMAND, OS.GMDI_USEDISABLED);
     if (id is -1) return null;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_ID;
     if (OS.GetMenuItemInfo (handle, id, false, &info)) {
         return display.getMenuItem (info.wID);
@@ -810,7 +810,7 @@
         }
     } else {
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         info.fMask = OS.MIIM_DATA;
         if (!OS.GetMenuItemInfo (handle, index, true, &info)) {
             error (DWT.ERROR_INVALID_RANGE);
@@ -873,7 +873,7 @@
     int length = OS.IsWinCE ? 4 : OS.GetMenuItemCount (handle);
     MenuItem [] items = new MenuItem [length];
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_DATA;
     while (OS.GetMenuItemInfo (handle, index, true, &info)) {
         if (count is items.length) {
@@ -898,7 +898,7 @@
         }
         int count = 0;
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         while (OS.GetMenuItemInfo (handle, count, true, &info)) count++;
         return count;
     }
@@ -1078,7 +1078,7 @@
     }
     int index = 0;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_DATA;
     while (OS.GetMenuItemInfo (handle, index, true, &info)) {
         if (info.dwItemData is item.id) return index;
@@ -1525,7 +1525,7 @@
     if (!OS.IsWin95) {
         if (OS.WIN32_VERSION < OS.VERSION (6, 0)) {
             MENUITEMINFO info;
-            info.cbSize = MENUITEMINFO.sizeof;
+            info.cbSize = OS.MENUITEMINFO_sizeof;
             info.fMask = OS.MIIM_BITMAP;
             for (int i=0; i<items.length; i++) {
                 MenuItem item = items [i];
@@ -1570,7 +1570,7 @@
 void updateForeground () {
     if (OS.WIN32_VERSION < OS.VERSION (4, 10)) return;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     int index = 0;
     while (OS.GetMenuItemInfo (handle, index, true, &info)) {
         info.fMask = OS.MIIM_BITMAP;
--- a/dwt/widgets/MenuItem.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/MenuItem.d	Sat Jul 26 02:08:41 2008 +0200
@@ -442,7 +442,7 @@
     }
     auto hMenu = parent.handle;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_STATE;
     bool success;
     static if (OS.IsWinCE) {
@@ -515,7 +515,7 @@
     if ((OS.IsPPC || OS.IsSP) && parent.hwndCB !is null) return false;
     auto hMenu = parent.handle;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_STATE;
     bool success = cast(bool) OS.GetMenuItemInfo (hMenu, id, false, &info);
     if (!success) error (DWT.ERROR_CANNOT_GET_SELECTION);
@@ -723,7 +723,7 @@
             OS.EnableMenuItem (hMenu, index, uEnable);
         } else {
             MENUITEMINFO info;
-            info.cbSize = MENUITEMINFO.sizeof;
+            info.cbSize = OS.MENUITEMINFO_sizeof;
             info.fMask = OS.MIIM_STATE;
             bool success = cast(bool) OS.GetMenuItemInfo (hMenu, id, false, &info);
             if (!success) error (DWT.ERROR_CANNOT_SET_ENABLED);
@@ -787,7 +787,7 @@
     }
     if (OS.WIN32_VERSION < OS.VERSION (4, 10)) return;
     MENUITEMINFO info;
-    info.cbSize = MENUITEMINFO.sizeof;
+    info.cbSize = OS.MENUITEMINFO_sizeof;
     info.fMask = OS.MIIM_BITMAP;
     if (parent.foreground !is -1) {
         info.hbmpItem = OS.HBMMENU_CALLBACK;
@@ -867,7 +867,7 @@
     } else {
         HMENU hMenu = parent.handle;
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         info.fMask = OS.MIIM_DATA;
         int index = 0;
         while (OS.GetMenuItemInfo (hMenu, index, true, &info)) {
@@ -983,7 +983,7 @@
         OS.CheckMenuItem (hMenu, index, uCheck);
     } else {
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         info.fMask = OS.MIIM_STATE;
         bool success = cast(bool) OS.GetMenuItemInfo (hMenu, id, false, &info);
         if (!success) error (DWT.ERROR_CANNOT_SET_SELECTION);
@@ -1081,7 +1081,7 @@
         success = OS.SendMessage (hwndCB, OS.TB_SETBUTTONINFO, id, &info2) !is 0;
     } else {
         MENUITEMINFO info;
-        info.cbSize = MENUITEMINFO.sizeof;
+        info.cbSize = OS.MENUITEMINFO_sizeof;
         auto hMenu = parent.handle;
 
         /* Use the character encoding for the default locale */
--- a/dwt/widgets/Shell.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Shell.d	Sat Jul 26 02:08:41 2008 +0200
@@ -649,7 +649,7 @@
     toolTip.id = id + Display.ID_START;
     static if (OS.IsWinCE) return;
     TOOLINFO lpti;
-    lpti.cbSize = TOOLINFO.sizeof;
+    lpti.cbSize = OS.TOOLINFO_sizeof;
     lpti.hwnd = handle;
     lpti.uId = toolTip.id;
     lpti.uFlags = OS.TTF_TRACK;
@@ -696,7 +696,7 @@
     static if (OS.IsWinCE) return;
     if (balloonTipHandle_ !is null) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         lpti.uId = toolTip.id;
         lpti.hwnd = handle;
         OS.SendMessage (balloonTipHandle_, OS.TTM_DELTOOL, 0, &lpti);
@@ -846,7 +846,7 @@
     if (OS.COMCTL32_MAJOR >= 6) {
         if (toolTipHandle_ is null) return;
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         if (OS.SendMessage (toolTipHandle_, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
             if ((lpti.uFlags & OS.TTF_IDISHWND) !is 0) {
                 OS.SendMessage (toolTipHandle_, OS.TTM_DELTOOL, 0, &lpti);
@@ -939,7 +939,7 @@
     if (hwndToolTip is null) return null;
     if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
             if ((lpti.uFlags & OS.TTF_IDISHWND) is 0) return findToolTip (lpti.uId);
         }
@@ -1675,7 +1675,7 @@
 void setToolTipText (HWND hwnd, String text) {
     static if (OS.IsWinCE) return;
     TOOLINFO lpti;
-    lpti.cbSize = TOOLINFO.sizeof;
+    lpti.cbSize = OS.TOOLINFO_sizeof;
     lpti.hwnd = handle;
     lpti.uId = cast(uint) hwnd;
     auto hwndToolTip = toolTipHandle ();
--- a/dwt/widgets/TabFolder.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/TabFolder.d	Sat Jul 26 02:08:41 2008 +0200
@@ -851,7 +851,7 @@
     */
     if (OS.COMCTL32_MAJOR >= 6) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         auto hwndToolTip = cast(HWND) OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);
         if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
             if ((lpti.uFlags & OS.TTF_IDISHWND) is 0) {
--- a/dwt/widgets/Table.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Table.d	Sat Jul 26 02:08:41 2008 +0200
@@ -546,7 +546,7 @@
                     if ((dwExStyle & OS.LVS_EX_FULLROWSELECT) is 0) {
                         if ((nmcd.nmcd.uItemState & OS.CDIS_FOCUS) !is 0) {
                             nmcd.nmcd.uItemState &= ~OS.CDIS_FOCUS;
-                            OS.MoveMemory (cast(NMLVCUSTOMDRAW*)lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+                            OS.MoveMemory (cast(NMLVCUSTOMDRAW*)lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
                         }
                     }
                 }
@@ -899,7 +899,7 @@
                 } else {
                     nmcd.clrTextBk = selectionForeground !is -1 ? OS.CLR_NONE : clrTextBk;
                 }
-                OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+                OS.MoveMemory (lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
             }
             code |= OS.CDRF_NEWFONT;
         }
@@ -942,7 +942,7 @@
             nmcd.clrTextBk = OS.GetSysColor (OS.COLOR_3DFACE);
         }
         nmcd.nmcd.uItemState &= ~OS.CDIS_SELECTED;
-        OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+        OS.MoveMemory (lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
         code |= OS.CDRF_NEWFONT;
     }
     return new LRESULT (code);
@@ -1596,7 +1596,7 @@
         auto hwndHeader = cast(HWND) OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
         if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, &rect) !is 0) {
             TOOLINFO lpti;
-            lpti.cbSize = TOOLINFO.sizeof;
+            lpti.cbSize = OS.TOOLINFO_sizeof;
             lpti.uFlags = OS.TTF_SUBCLASS;
             lpti.hwnd = hwndHeader;
             lpti.uId = column.id = display.nextToolTipId++;
@@ -1987,7 +1987,7 @@
     /* Remove the tool tip item for the header */
     if (headerToolTipHandle !is null) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         lpti.uId = column.id;
         lpti.hwnd = cast(HWND) OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
         OS.SendMessage (headerToolTipHandle, OS.TTM_DELTOOL, 0, &lpti);
@@ -3385,12 +3385,12 @@
                 selectionForeground = clrSelectionText;
             }
             nmcd.nmcd.uItemState &= ~OS.CDIS_SELECTED;
-            OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+            OS.MoveMemory (lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
         }
     } else {
         if (ignoreDrawSelection) {
             nmcd.nmcd.uItemState |= OS.CDIS_SELECTED;
-            OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+            OS.MoveMemory (lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
         }
     }
 
@@ -3412,7 +3412,7 @@
             }
             if (!ignoreDrawFocus) {
                 nmcd.nmcd.uItemState &= ~OS.CDIS_FOCUS;
-                OS.MoveMemory (cast(void*)lParam, &nmcd, NMLVCUSTOMDRAW.sizeof);
+                OS.MoveMemory (cast(void*)lParam, &nmcd, OS.NMLVCUSTOMDRAW_sizeof);
                 focusRect = new RECT;
                 *focusRect = textRect;
             }
@@ -3450,7 +3450,7 @@
     }
     if (focused && ignoreDrawFocus) {
         nmcd.nmcd.uItemState &= ~OS.CDIS_FOCUS;
-        OS.MoveMemory (lParam, nmcd, NMLVCUSTOMDRAW.sizeof);
+        OS.MoveMemory (lParam, nmcd, OS.NMLVCUSTOMDRAW_sizeof);
     }
     if (ignoreDrawForeground) {
         RECT clipRect = item.getBounds (nmcd.nmcd.dwItemSpec, nmcd.iSubItem, true, true, true, false, hDC);
@@ -5282,7 +5282,7 @@
     auto hwndHeader = cast(HWND) OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
     RECT rect;
     TOOLINFO lpti;
-    lpti.cbSize = TOOLINFO.sizeof;
+    lpti.cbSize = OS.TOOLINFO_sizeof;
     lpti.uFlags = OS.TTF_SUBCLASS;
     lpti.hwnd = hwndHeader;
     lpti.lpszText = OS.LPSTR_TEXTCALLBACK;
@@ -6293,7 +6293,7 @@
         case OS.LVN_GETDISPINFOW: {
 //          if (drawCount !is 0 || !OS.IsWindowVisible (handle)) break;
             NMLVDISPINFO* plvfi = cast(NMLVDISPINFO*)lParam;
-            //OS.MoveMemory (plvfi, lParam, NMLVDISPINFO.sizeof);
+            //OS.MoveMemory (plvfi, lParam, OS.NMLVDISPINFO_sizeof);
 
             bool [] visible = display.columnVisible;
             if (visible !is null && !visible [plvfi.item.iSubItem]) {
@@ -6418,7 +6418,7 @@
                     move = true;
                 }
             }
-            //if (move) OS.MoveMemory (lParam, plvfi, NMLVDISPINFO.sizeof);
+            //if (move) OS.MoveMemory (lParam, plvfi, OS.NMLVDISPINFO_sizeof);
             break;
         }
         case OS.NM_CUSTOMDRAW: {
@@ -6441,7 +6441,7 @@
                 }
             }
             NMLVCUSTOMDRAW* nmcd = cast(NMLVCUSTOMDRAW*)lParam;
-            //OS.MoveMemory (nmcd, lParam, NMLVCUSTOMDRAW.sizeof);
+            //OS.MoveMemory (nmcd, lParam, OS.NMLVCUSTOMDRAW_sizeof);
             switch (nmcd.nmcd.dwDrawStage) {
                 case OS.CDDS_PREPAINT: return CDDS_PREPAINT (nmcd, wParam, lParam);
                 case OS.CDDS_ITEMPREPAINT: return CDDS_ITEMPREPAINT (nmcd, wParam, lParam);
--- a/dwt/widgets/TableColumn.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/TableColumn.d	Sat Jul 26 02:08:41 2008 +0200
@@ -872,7 +872,7 @@
         RECT rect;
         if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, &rect) !is 0) {
             TOOLINFO lpti;
-            lpti.cbSize = TOOLINFO.sizeof;
+            lpti.cbSize = OS.TOOLINFO_sizeof;
             lpti.hwnd = hwndHeader;
             lpti.uId = id;
             lpti.rect.left = rect.left;
--- a/dwt/widgets/ToolBar.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/ToolBar.d	Sat Jul 26 02:08:41 2008 +0200
@@ -1209,7 +1209,7 @@
     */
     if (OS.COMCTL32_MAJOR >= 6) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         auto hwndToolTip = cast(HWND) OS.SendMessage (handle, OS.TB_GETTOOLTIPS, 0, 0);
         if (OS.SendMessage (hwndToolTip, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
             if ((lpti.uFlags & OS.TTF_IDISHWND) is 0) {
--- a/dwt/widgets/ToolTip.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/ToolTip.d	Sat Jul 26 02:08:41 2008 +0200
@@ -229,7 +229,7 @@
     auto hwndToolTip_ = hwndToolTip ();
     if (OS.SendMessage (hwndToolTip_, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         if (OS.SendMessage (hwndToolTip_, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
             return (lpti.uFlags & OS.TTF_IDISHWND) is 0 && lpti.uId is id;
         }
@@ -275,7 +275,7 @@
             auto hwndToolTip_ = hwndToolTip ();
             if (OS.SendMessage (hwndToolTip_, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) {
                 TOOLINFO lpti;
-                lpti.cbSize = TOOLINFO.sizeof;
+                lpti.cbSize = OS.TOOLINFO_sizeof;
                 if (OS.SendMessage (hwndToolTip_, OS.TTM_GETCURRENTTOOL, 0, &lpti) !is 0) {
                     if ((lpti.uFlags & OS.TTF_IDISHWND) is 0) {
                         if (lpti.uId is id) {
@@ -452,7 +452,7 @@
     if (item is null) {
         auto hwnd = parent.handle;
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         lpti.uId = id;
         lpti.hwnd = hwnd;
         auto hwndToolTip_ = hwndToolTip ();
--- a/dwt/widgets/Tree.d	Thu Jul 24 23:02:48 2008 +0200
+++ b/dwt/widgets/Tree.d	Sat Jul 26 02:08:41 2008 +0200
@@ -2080,7 +2080,7 @@
         RECT rect;
         if (OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, index, &rect) !is 0) {
             TOOLINFO lpti;
-            lpti.cbSize = TOOLINFO.sizeof;
+            lpti.cbSize = OS.TOOLINFO_sizeof;
             lpti.uFlags = OS.TTF_SUBCLASS;
             lpti.hwnd = hwndHeader;
             lpti.uId = column.id = display.nextToolTipId++;
@@ -2249,7 +2249,7 @@
     if (itemToolTipHandle is null) error (DWT.ERROR_NO_HANDLES);
     OS.SendMessage (itemToolTipHandle, OS.TTM_SETDELAYTIME, OS.TTDT_INITIAL, 0);
     TOOLINFO lpti;
-    lpti.cbSize = TOOLINFO.sizeof;
+    lpti.cbSize = OS.TOOLINFO_sizeof;
     lpti.hwnd = handle;
     lpti.uId = cast(int)handle;
     lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT;
@@ -2565,7 +2565,7 @@
     /* Remove the tool tip item for the header */
     if (headerToolTipHandle !is null) {
         TOOLINFO lpti;
-        lpti.cbSize = TOOLINFO.sizeof;
+        lpti.cbSize = OS.TOOLINFO_sizeof;
         lpti.uId = column.id;
         lpti.hwnd = hwndHeader;
         OS.SendMessage (headerToolTipHandle, OS.TTM_DELTOOL, 0, &lpti);
@@ -5466,7 +5466,7 @@
     if (headerToolTipHandle is null) return;
     RECT rect;
     TOOLINFO lpti;
-    lpti.cbSize = TOOLINFO.sizeof;
+    lpti.cbSize = OS.TOOLINFO_sizeof;
     lpti.uFlags = OS.TTF_SUBCLASS;
     lpti.hwnd = hwndHeader;
     lpti.lpszText = OS.LPSTR_TEXTCALLBACK;
@@ -6690,7 +6690,7 @@
                     }
                 }
                 TOOLINFO lpti;
-                lpti.cbSize = TOOLINFO.sizeof;
+                lpti.cbSize = OS.TOOLINFO_sizeof;
                 lpti.hwnd = handle;
                 lpti.uId = cast(int) handle;
                 lpti.uFlags = OS.TTF_SUBCLASS | OS.TTF_TRANSPARENT;
@@ -7732,7 +7732,7 @@
             }
             if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, 0) !is 0) {
                 TOOLINFO lpti;
-                lpti.cbSize = TOOLINFO.sizeof;
+                lpti.cbSize = OS.TOOLINFO_sizeof;
                 if (OS.SendMessage (itemToolTipHandle, OS.TTM_GETCURRENTTOOL, 0, cast(int)&lpti) !is 0) {
                     int index;
                     TreeItem item;