Index: Include/api_msg.sbp
===================================================================
--- Include/api_msg.sbp	(revision 1)
+++ Include/api_msg.sbp	(revision 120)
@@ -135,5 +135,5 @@
 Const WM_CREATE =                     &H0001
 ' lParam of WM_CREATE message point to...
-Type CREATESTRUCT
+Type CREATESTRUCTA
 	lpCreateParams As VoidPtr
 	hInstance As HINSTANCE
@@ -145,8 +145,27 @@
 	x As Long
 	style As Long
-	lpszName As BytePtr
-	lpszClass As BytePtr
+	lpszName As PCSTR
+	lpszClass As PCSTR
 	dwExStyle As DWord
 End Type
+Type CREATESTRUCTW
+	lpCreateParams As VoidPtr
+	hInstance As HINSTANCE
+	hMenu As HMENU
+	hwndParent As HWND
+	cy As Long
+	cx As Long
+	y As Long
+	x As Long
+	style As Long
+	lpszName As PCWSTR
+	lpszClass As PCWSTR
+	dwExStyle As DWord
+End Type
+#ifdef UNICODE
+TypeDef CREATESTRUCT = CREATESTRUCTW
+#else
+TypeDef CREATESTRUCT = CREATESTRUCTA
+#endif
 Const WM_DESTROY =                    &H0002
 Const WM_MOVE =                       &H0003
@@ -300,5 +319,7 @@
 	dwLocaleId As DWord
 End Type
+'#if WINVER > &h0500
 Const WM_GETOBJECT =                  &H003D
+'#endif
 Const WM_COMPACTING =                 &H0041
 Const WM_COMMNOTIFY =                 &H0044
@@ -412,5 +433,13 @@
 Const WM_NCMBUTTONUP =                &H00A8
 Const WM_NCMBUTTONDBLCLK =            &H00A9
-
+'#if _WIN32_WINNT >= &h0500
+Const WM_NCXBUTTONDOWN =              &H00AB
+Const WM_NCXBUTTONUP =                &H00AC
+Const WM_NCXBUTTONDBLCLK =            &h00AD
+'#endif
+'#if _WIN32_WINNT >= &H0501
+Const WM_INPUT_DEVICE_CHANGE =        &H00FE
+Const WM_INPUT =                      &H00FF
+'#endif
 Const WM_KEYFIRST =                   &H0100
 Const WM_KEYDOWN =                    &H0100
@@ -422,6 +451,11 @@
 Const WM_SYSCHAR =                    &H0106
 Const WM_SYSDEADCHAR =                &H0107
-Const WM_KEYLAST =                    &H0108
-
+'#if _WIN32_WINNT >= &h0501
+Const WM_UNICHAR =                    &H0109
+Const UNICODE_NOCHAR =                &HFFFF
+Const WM_KEYLAST =                    &H0109
+'#else
+'Const WM_KEYLAST =                    &H0108
+'#endif
 Const WM_IME_STARTCOMPOSITION =       &H010D
 Const WM_IME_ENDCOMPOSITION =         &H010E
@@ -482,5 +516,5 @@
 Const   MNC_SELECT = 3
 Const WM_ENTERIDLE =                  &H0121
-
+'#if WINVER >= &H0500
 Const WM_MENURBUTTONUP =              &H0122
 Const WM_MENUDRAG =                   &H0123
@@ -489,4 +523,8 @@
 Const WM_MENUCOMMAND =                &H0126
 
+Const WM_CHANGEUISTATE =              &H0127
+Const WM_UPDATEUISTATE =              &H0128
+Const WM_QUERYUISTATE =               &H0129
+'#endif
 Const WM_CTLCOLORMSGBOX =             &H0132
 Const WM_CTLCOLOREDIT =               &H0133
@@ -496,4 +534,5 @@
 Const WM_CTLCOLORSCROLLBAR =          &H0137
 Const WM_CTLCOLORSTATIC =             &H0138
+Const MN_GETHMENU =                   &H01E1
 
 Const WM_MOUSEFIRST =                 &H0200
@@ -508,8 +547,28 @@
 Const WM_MBUTTONUP =                  &H0208
 Const WM_MBUTTONDBLCLK =              &H0209
+'#if _WIN32_WINNT >= &H0400 || _WIN32_WINDOWS > &H0400
 Const WM_MOUSEWHEEL =                 &H020A
-Const WM_MOUSELAST =                  &H020A
+'#endif
+'#if _WIN32_WINNT >= &H0500
+Const WM_XBUTTONDOWN =                &H020B
+Const WM_XBUTTONUP =                  &H020C
+Const WM_XBUTTONDBLCLK =              &H020D
+'#endif
+'#if _WIN32_WINNT >= &H0600
+Const WM_MOUSEHWHEEL =                &H020E
+'#endif
+Const WM_MOUSELAST =                  &H020E
+
 Const WHEEL_DELTA =                   120
 Const WHEEL_PAGESCROLL =              &HFFFFFFFF
+Const GET_WHEEL_DELTA_WPARAM(wp) = (HIWORD(wp) As Integer)
+'#if _WIN32_WINNT >= &H0500
+Const GET_KEYSTATE_WPARAM(wp) = (LOWORD(wp))
+Const GET_NCHITTEST_WPARAM(wp) = (LOWORD(wp) As Integer)
+Const GET_XBUTTON_WPARAM(wp) = (HIWORD(wp))
+
+Const XBUTTON1 = &H0001
+Const XBUTTON2 = &H0002
+'#endif
 
 Const WM_PARENTNOTIFY =               &H0210
@@ -517,4 +576,5 @@
 Const WM_EXITMENULOOP =               &H0212
 
+Const WM_NEXTMENU =                   &H0213
 Const WM_SIZING =                     &H0214
 ' wParam for WM_SIZING message
@@ -547,4 +607,12 @@
 Const   PBT_APMOEMEVENT =               &H000B
 Const   PBT_APMRESUMEAUTOMATIC =        &H0012
+'#if _WIN32_WINNT >= &H0502
+Const   PBT_POWERSETTINGCHANGE =        &H0013
+Type POWERBROADCAST_SETTING
+	PowerSetting As GUID
+	DataLength As DWord
+	Data[1] As Byte
+End Type
+'#endif
 
 Const WM_DEVICECHANGE =               &H0219
@@ -552,7 +620,7 @@
 Const WM_MDICREATE =                  &H0220
 ' lParam of WM_MDICREATE message point to...
-Type MDICREATESTRUCT
-	szClass As BytePtr
-	szTitle As BytePtr
+Type MDICREATESTRUCTA
+	szClass As PCSTR
+	szTitle As PCSTR
 	hOwner As HANDLE
 	x As Long
@@ -563,4 +631,20 @@
 	lParam As LPARAM
 End Type
+Type MDICREATESTRUCTW
+	szClass As PCWSTR
+	szTitle As PCWSTR
+	hOwner As HANDLE
+	x As Long
+	y As Long
+	cx As Long
+	cy As Long
+	style As DWord
+	lParam As LPARAM
+End Type
+#ifdef UNICODE
+TypeDef MDICREATESTRUCT = MDICREATESTRUCTW
+#else
+TypeDef MDICREATESTRUCT = MDICREATESTRUCTA
+#endif
 Const WM_MDIDESTROY =                 &H0221
 Const WM_MDIACTIVATE =                &H0222
@@ -589,11 +673,23 @@
 Const WM_IME_SELECT =                 &H0285
 Const WM_IME_CHAR =                   &H0286
+'#if WINVER >= 0x0500
 Const WM_IME_REQUEST =                &H0288
+'#endif
 Const WM_IME_KEYDOWN =                &H0290
 Const WM_IME_KEYUP =                  &H0291
-
+'#if _WIN32_WINNT >= &H0400 Or WINVER >= &H0500
 Const WM_MOUSEHOVER =                 &H02A1
 Const WM_MOUSELEAVE =                 &H02A3
-
+'#endif
+'#if WINVER >= &H0500
+Const WM_NCMOUSEHOVER =               &H02A1
+Const WM_NCMOUSELEAVE =               &H02A3
+'#endif
+'#if _WIN32_WINNT >= &H0501
+Const WM_WTSSESSION_CHANGE =          &H02B1
+
+Const WM_TABLET_FIRST =               &H02C0
+Const WM_TABLET_LAST =                &H02DF
+'#endif
 Const WM_CUT =                        &H0300
 Const WM_COPY =                       &H0301
@@ -625,4 +721,26 @@
 Const   PRF_CHILDREN =      &H00000010
 Const   PRF_OWNED =         &H00000020
+
+'#if _WIN32_WINNT >= &H0500
+Const WM_APPCOMMAND =                 &H0319
+'#endif
+'#if _WIN32_WINNT >= &H0501
+Const WM_THEMECHANGED =               &H031A
+'#endif
+
+'#if _WIN32_WINNT >= &H0501
+Const WM_CLIPBOARDUPDATE =            &H031D
+'#endif
+
+'#if _WIN32_WINNT >= &H0600
+Const WM_DWMCOMPOSITIONCHANGED =      &H031E
+Const WM_DWMNCRENDERINGCHANGED =      &H031F
+Const WM_DWMCOLORIZATIONCOLORCHANGED =&H0320
+Const WM_DWMWINDOWMAXIMIZEDCHANGE =   &H0321
+'#endif
+
+'#if WINVER >= &H0600
+Const WM_GETTITLEBARINFOEX =          &H033F
+'#endif
 
 Const WM_HANDHELDFIRST =              &H0358
