Changeset 77
- Timestamp:
- Jan 27, 2007, 12:04:09 PM (18 years ago)
- Location:
- Include
- Files:
-
- 15 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Drawing/Color.ab
r25 r77 50 50 51 51 Function A() As Byte 52 Return ( Argb >> Color_AlphaShift) As Byte52 Return (argb >> ALPHA_SHIFT) As Byte 53 53 End Function 54 54 55 55 Function R() As Byte 56 Return ( Argb >> Color_RedShift) As Byte56 Return (argb >> RED_SHIFT) As Byte 57 57 End Function 58 58 59 59 Function G() As Byte 60 Return ( Argb >> Color_GreenShift) As Byte60 Return (argb >> GREEN_SHIFT) As Byte 61 61 End Function 62 62 63 63 Function B() As Byte 64 GetBlue = (argb >> Color_BlueShift) As Byte64 Return (argb >> BLUE_SHIFT) As Byte 65 65 End Function 66 66 … … 306 306 */ 307 307 Static Function MakeARGB(a As Byte, r As Byte, g As Byte, b As Byte) As ARGB 308 MakeARGB = (((b As ARGB) << Color_BlueShift) Or _309 ((g As ARGB) << Color_GreenShift) Or _310 ((r As ARGB) << Color_RedShift) Or _311 ((a As ARGB) << Color_AlphaShift))308 MakeARGB = (((b As ARGB) << BLUE_SHIFT) Or _ 309 ((g As ARGB) << GREEN_SHIFT) Or _ 310 ((r As ARGB) << RED_SHIFT) Or _ 311 ((a As ARGB) << ALPHA_SHIFT)) 312 312 End Function 313 313 -
Include/Classes/System/Drawing/Imaging/misc.ab
r12 r77 14 14 End Enum 15 15 16 Const ALPHA_SHIFT = 24 17 Const RED_SHIFT = 16 18 Const GREEN_SHIFT = 8 19 Const BLUE_SHIFT = 0 16 Const ALPHA_SHIFT = 24 As DWord 17 Const RED_SHIFT = 16 As DWord 18 Const GREEN_SHIFT = 8 As DWord 19 Const BLUE_SHIFT = 0 As DWord 20 20 Const ALPHA_MASK = ((&hff As ARGB) << ALPHA_SHIFT) 21 21 -
Include/Classes/System/Drawing/PointF.ab
r27 r77 110 110 End Function 111 111 112 Static Function Substract( (pt1 As PointF, pt2 As PointF) As PointF112 Static Function Substract(pt1 As PointF, pt2 As PointF) As PointF 113 113 Dim ret As PointF(pt1.x - pt2.x, pt1.y - pt2.y) 114 114 Return ret -
Include/Classes/System/Drawing/Rectangle.ab
r28 r77 18 18 End Sub 19 19 20 Sub Rectangle(x As Single, y As Single, width As Single, height As Single)20 Sub Rectangle(x As Long, y As Long, width As Long, height As Long) 21 21 x = x 22 22 y = y … … 25 25 End Sub 26 26 27 Sub Rectangle(location As Point, size As Size) 28 x = location.X 29 y = location.Y 30 width = size.Height 31 height = size.Height 32 End Sub 33 34 Sub Rectangle(ByRef rc As Rectangle) 35 x = rc.x 36 y = rc.y 37 width = rc.width 38 height = rc.height 27 Sub Rectangle(l As Point, s As Size) 28 x = l.X 29 y = l.Y 30 width = s.Height 31 height = s.Height 32 End Sub 33 34 Sub Rectangle(ByRef r As Rectangle) 35 x = r.x 36 y = r.y 37 width = r.width 38 height = r.height 39 End Sub 40 41 Sub Rectangle(ByRef r As RECT) 42 This = FromLTRB(r.left, r.top, r.right, r.bottom) 39 43 End Sub 40 44 … … 58 62 End Sub 59 63 60 Function X() As Single64 Function X() As Long 61 65 Return x 62 66 End Function 63 67 64 Sub X(value As Single)68 Sub X(value As Long) 65 69 x = value 66 70 End Sub 67 71 68 Function Y() As Single72 Function Y() As Long 69 73 Return y 70 74 End Function 71 75 72 Sub Y(value As Single)76 Sub Y(value As Long) 73 77 y = value 74 78 End Sub 75 79 76 Function Width() As Single80 Function Width() As Long 77 81 Return width 78 82 End Function 79 83 80 Sub Width(value As Single)84 Sub Width(value As Long) 81 85 width = value 82 86 End Sub 83 87 84 Function Height() As Single88 Function Height() As Long 85 89 Return height 86 90 End Function 87 91 88 Sub Height(value As Single)92 Sub Height(value As Long) 89 93 height = value 90 94 End Sub 91 95 92 Function Left() As Single96 Function Left() As Long 93 97 Return X 94 98 End Function 95 99 96 Function Top() As Single100 Function Top() As Long 97 101 Return Y 98 102 End Function 99 103 100 Function Right() As Single104 Function Right() As Long 101 105 Return X + Width 102 106 End Function 103 107 104 Function Bottom() As Single108 Function Bottom() As Long 105 109 Return Y + Height 106 110 End Function … … 144 148 End Function 145 149 146 Static Function FromLTRB(l As Single, t As Single, r As Single, b As Single) As Rectangle150 Static Function FromLTRB(l As Long, t As Long, r As Long, b As Long) As Rectangle 147 151 Dim rect As Rectangle(l, t, r - l, r - b) 148 152 return rect 149 153 End Function 150 154 151 Function Contains(x As Single, y As Single) As BOOL155 Function Contains(x As Long, y As Long) As BOOL 152 156 If x >= X And x < X + Width And y >= Y And y < Y + Height Then 153 157 Contains = _System_TRUE … … 169 173 End Function 170 174 171 Sub Inflate(dx As Single, dy As Single)175 Sub Inflate(dx As Long, dy As Long) 172 176 X -= dx 173 177 Y -= dy … … 180 184 End Sub 181 185 182 Static Function Inflate(ByRef rc As Rectangle, x As Single, y As Single) As Rectangle186 Static Function Inflate(ByRef rc As Rectangle, x As Long, y As Long) As Rectangle 183 187 Inflate = rc 184 188 Inflate.Inflate(x, y) … … 190 194 191 195 Static Function Intersect(ByRef a As Rectangle, ByRef b As Rectangle) As Rectangle 192 Dim right As Single, bottom As Single, left As Single, top As Single196 Dim right As Long, bottom As Long, left As Long, top As Long 193 197 right = Math.Min(a.Right, b.Right) 194 198 bottom = Math.Min(a.Bottom, b.Bottom) … … 210 214 211 215 Static Function Union(ByRef a As Rectangle, ByRef b As Rectangle) As Rectangle 212 Dim right As Single, bottom As Single, left As Single, top As Single216 Dim right As Long, bottom As Long, left As Long, top As Long 213 217 right = Math.Max(a.Right(), b.Right()) 214 218 bottom = Math.Max(a.Bottom(), b.Bottom()) … … 222 226 End Sub 223 227 224 Sub Offset(dx As Single, dy As Single)228 Sub Offset(dx As Long, dy As Long) 225 229 X += dx 226 230 Y += dy … … 254 258 End Function 255 259 260 Function ToRECT() As RECT 261 With ToRECT 262 .left = x 263 .top = y 264 .right = x + width 265 .bottom = y + height 266 End With 267 End Function 268 256 269 Public 257 x As Single258 y As Single259 width As Single260 height As Single270 x As Long 271 y As Long 272 width As Long 273 height As Long 261 274 End Class 262 275 -
Include/Classes/System/Threading/WaitHandle.ab
r58 r77 6 6 Class WaitHandle 7 7 Public 8 Virtual Sub ~WaitHandle() 9 Close() 10 End Sub 11 12 ' Const Function SafeWaitHandle() As SafeWaitHandle 13 ' Sub SafeWaitHandle(h As SafeWaitHandle) 8 ' Properties 9 ' Const Function SafeWaitHandle() As SafeWaitHandle 10 ' Sub SafeWaitHandle(h As SafeWaitHandle) 14 11 15 12 Const Virtual Function Handle() As HANDLE … … 19 16 Virtual Sub Handle(newHandle As HANDLE) 20 17 h = newHandle 18 End Sub 19 20 ' Methods 21 22 Virtual Sub ~WaitHandle() 23 Close() 21 24 End Sub 22 25 -
Include/GdiPlusInit.ab
r13 r77 5 5 6 6 Enum DebugEventLevel 7 8 7 DebugEventLevelFatal 8 DebugEventLevelWarning 9 9 End Enum 10 10 -
Include/OAIdl.ab
r42 r77 936 936 Inherits IUnknown 937 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 938 Function SetGuid( 939 /* [in] */ ByRef guid As GUID) As HRESULT 940 941 Function SetTypeFlags( 942 /* [in] */ uTypeFlags As DWord) As HRESULT 943 944 Function SetDocString( 945 /* [in] */ pStrDoc As LPOLESTR) As HRESULT 946 947 Function SetHelpContext( 948 /* [in] */ dwHelpContext As DWord) As HRESULT 949 950 Function SetVersion( 951 /* [in] */ wMajorVerNum As Word, 952 /* [in] */ wMinorVerNum As Word) As HRESULT 953 954 Function AddRefTypeInfo( 955 /* [in] */ pTInfo As VoidPtr /* *ITypeInfo */, 956 /* [in] */ByRef hRefType As HREFTYPE) As HRESULT 957 958 Function AddFuncDesc( 959 /* [in] */ index As DWord, 960 /* [in] */ ByRef FuncDesc As FUNCDESC) As HRESULT 961 962 Function AddImplType( 963 /* [in] */ index As DWord, 964 /* [in] */ hRefType As HREFTYPE) As HRESULT 965 966 Function SetImplTypeFlags( 967 /* [in] */ index As DWord, 968 /* [in] */ implTypeFlags As Long) As HRESULT 969 970 Function SetAlignment( 971 /* [in] */ cbAlignment As Long) As HRESULT 972 973 Function SetSchema( 974 /* [in] */ pStrSchema As LPOLESTR) As HRESULT 975 976 Function AddVarDesc( 977 /* [in] */ index As DWord, 978 /* [in] */ ByRef VarDesc As VARDESC) As HRESULT 979 980 Function SetFuncAndParamNames( 981 /* [in] */ index As DWord, 982 /* [in][size_is][in] */ rgszNames As *LPOLESTR, 983 /* [in] */ cNames As DWord) As HRESULT 984 985 Function SetVarName( 986 /* [in] */ index As DWord, 987 /* [in] */ szName As LPOLESTR) As HRESULT 988 989 Function SetTypeDescAlias( 990 /* [in] */ ByRef TDescAlias As TYPEDESC) As HRESULT 991 992 Function DefineFuncAsDllEntry( 993 /* [in] */ index As DWord, 994 /* [in] */ szDllName As LPOLESTR, 995 /* [in] */ zProcName As LPOLESTR) As HRESULT 996 997 Function SetFuncDocString( 998 /* [in] */ index As DWord, 999 /* [in] */ szDocString As LPOLESTR) As HRESULT 1000 1001 Function SetVarDocString( 1002 /* [in] */ index As DWord, 1003 /* [in] */ szDocString As LPOLESTR) As HRESULT 1004 1005 Function SetFuncHelpContext( 1006 /* [in] */ index As DWord, 1007 /* [in] */ dwHelpContext As DWord) As HRESULT 1008 1009 Function SetVarHelpContext( 1010 /* [in] */ index As DWord, 1011 /* [in] */ dwHelpContext As DWord) As HRESULT 1012 1013 Function SetMops( 1014 /* [in] */ index As DWord, 1015 /* [in] */ bstrMops As BSTR) As HRESULT 1016 1017 Function SetTypeIdldesc( 1018 /* [in] */ ByRef IdlDesc As IDLDESC) As HRESULT 1019 1020 Function LayOut() As HRESULT 1021 1021 End Interface 1022 1022 … … 1239 1239 /* [unique][uuid][object] */ 1240 1240 1241 Typedef /* [unique] */ LPENUMVARIANT =*IEnumVARIANT1241 Typedef LPENUMVARIANT = /* [unique] */ *IEnumVARIANT 1242 1242 1243 1243 Dim IID_IEnumVARIANT = [&h00020404, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID … … 1260 1260 #endif /* __IEnumVARIANT_INTERFACE_DEFINED__ */ 1261 1261 1262 #ifdef __UNDECLARED__1263 1264 1262 #ifndef __ITypeComp_INTERFACE_DEFINED__ 1265 1263 #define __ITypeComp_INTERFACE_DEFINED__ … … 1268 1266 /* [unique][uuid][object] */ 1269 1267 1270 TypeDef /* [unique] */ ITypeComp *LPTYPECOMP;1268 TypeDef LPTYPECOMP = /* [unique] */ *ITypeComp 1271 1269 1272 1270 /* [v1_enum] */ … … 1285 1283 lptcomp As *ITypeComp 1286 1284 End Union 1285 */ 1286 Type BINDPTR 1287 p As VoidPtr '暫定 1288 End Type 1287 1289 1288 1290 TypeDef LPBINDPTR = *BINDPTR 1289 */ 1290 1291 EXTERN_C const IID IID_ITypeComp; 1292 1293 MIDL_INTERFACE("00020403-0000-0000-C000-000000000046") 1294 ITypeComp : public IUnknown 1295 { 1296 public: 1297 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Bind( 1298 /* [in] */ LPOLESTR szName, 1299 /* [in] */ ULONG lHashVal, 1300 /* [in] */ WORD wFlags, 1301 /* [out] */ ITypeInfo **ppTInfo, 1302 /* [out] */ DESCKIND *pDescKind, 1303 /* [out] */ BINDPTR *pBindPtr) As HRESULT 1304 1305 virtual /* [local] */ HRESULT STDMETHODCALLTYPE BindType( 1306 /* [in] */ LPOLESTR szName, 1307 /* [in] */ ULONG lHashVal, 1308 /* [out] */ ITypeInfo **ppTInfo, 1309 /* [out] */ ITypeComp **ppTComp) As HRESULT 1310 1311 }; 1312 1291 1292 Dim IID_ITypeComp = [&h00020403, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1293 1294 Interface ITypeComp 1295 Inherits IUnknown 1296 1297 Function /* [local] */ Bind( 1298 /* [in] */ szName As LPOLESTR, 1299 /* [in] */ HashVal As DWord, 1300 /* [in] */ wFlags As Word, 1301 /* [out] */ ByRef pTInfo As *ITypeInfo, 1302 /* [out] */ ByRef DescKind As DESCKIND, 1303 /* [out] */ ByRef BindPtr As BINDPTR) As HRESULT 1304 1305 Function /* [local] */ BindType( 1306 /* [in] */ szName As LPOLESTR, 1307 /* [in] */ HashVal As DWord, 1308 /* [out] */ ByRef pTInfo As *ITypeInfo, 1309 /* [out] */ ByRef pTComp As *ITypeComp) As HRESULT 1310 End Interface 1313 1311 1314 1312 #endif /* __ITypeComp_INTERFACE_DEFINED__ */ 1315 1316 1313 1317 1314 #ifndef __ITypeInfo_INTERFACE_DEFINED__ … … 1321 1318 /* [unique][uuid][object] */ 1322 1319 1323 TypeDef /* [unique] */ ITypeInfo *LPTYPEINFO; 1324 1325 1326 EXTERN_C const IID IID_ITypeInfo; 1327 1328 MIDL_INTERFACE("00020401-0000-0000-C000-000000000046") 1329 ITypeInfo : public IUnknown 1330 { 1331 public: 1332 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetTypeAttr( 1333 /* [out] */ TYPEATTR **ppTypeAttr) As HRESULT 1334 1335 Function GetTypeComp( 1336 /* [out] */ ITypeComp **ppTComp) As HRESULT 1337 1338 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetFuncDesc( 1339 /* [in] */ UINT index, 1340 /* [out] */ FUNCDESC **ppFuncDesc) As HRESULT 1341 1342 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetVarDesc( 1343 /* [in] */ UINT index, 1344 /* [out] */ VARDESC **ppVarDesc) As HRESULT 1345 1346 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetNames( 1347 /* [in] */ MEMBERID memid, 1348 /* [length_is][size_is][out] */ BSTR *rgBstrNames, 1349 /* [in] */ UINT cMaxNames, 1350 /* [out] */ UINT *pcNames) As HRESULT 1351 1352 Function GetRefTypeOfImplType( 1353 /* [in] */ UINT index, 1354 /* [out] */ HREFTYPE *pRefType) As HRESULT 1355 1356 Function GetImplTypeFlags( 1357 /* [in] */ UINT index, 1358 /* [out] */ INT *pImplTypeFlags) As HRESULT 1359 1360 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetIDsOfNames( 1361 /* [size_is][in] */ LPOLESTR *rgszNames, 1362 /* [in] */ UINT cNames, 1363 /* [size_is][out] */ MEMBERID *pMemId) As HRESULT 1364 1365 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Invoke( 1366 /* [in] */ PVOID pvInstance, 1367 /* [in] */ MEMBERID memid, 1368 /* [in] */ WORD wFlags, 1369 /* [out][in] */ DISPPARAMS *pDispParams, 1370 /* [out] */ VARIANT *pVarResult, 1371 /* [out] */ EXCEPINFO *pExcepInfo, 1372 /* [out] */ UINT *puArgErr) As HRESULT 1373 1374 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation( 1375 /* [in] */ MEMBERID memid, 1376 /* [out] */ BSTR *pBstrName, 1377 /* [out] */ BSTR *pBstrDocString, 1378 /* [out] */ DWORD *pdwHelpContext, 1379 /* [out] */ BSTR *pBstrHelpFile) As HRESULT 1380 1381 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDllEntry( 1382 /* [in] */ MEMBERID memid, 1383 /* [in] */ INVOKEKIND invKind, 1384 /* [out] */ BSTR *pBstrDllName, 1385 /* [out] */ BSTR *pBstrName, 1386 /* [out] */ WORD *pwOrdinal) As HRESULT 1387 1388 Function GetRefTypeInfo( 1389 /* [in] */ HREFTYPE hRefType, 1390 /* [out] */ ITypeInfo **ppTInfo) As HRESULT 1391 1392 virtual /* [local] */ HRESULT STDMETHODCALLTYPE AddressOfMember( 1393 /* [in] */ MEMBERID memid, 1394 /* [in] */ INVOKEKIND invKind, 1395 /* [out] */ PVOID *ppv) As HRESULT 1396 1397 virtual /* [local] */ HRESULT STDMETHODCALLTYPE CreateInstance( 1398 /* [in] */ IUnknown *pUnkOuter, 1399 /* [in] */ REFIID riid, 1400 /* [iid_is][out] */ PVOID *ppvObj) As HRESULT 1401 1402 Function GetMops( 1403 /* [in] */ MEMBERID memid, 1404 /* [out] */ BSTR *pBstrMops) As HRESULT 1405 1406 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetContainingTypeLib( 1407 /* [out] */ ITypeLib **ppTLib, 1408 /* [out] */ UINT *pIndex) As HRESULT 1409 1410 virtual /* [local] */ void STDMETHODCALLTYPE ReleaseTypeAttr( 1411 /* [in] */ TYPEATTR *pTypeAttr) As HRESULT 1412 1413 virtual /* [local] */ void STDMETHODCALLTYPE ReleaseFuncDesc( 1414 /* [in] */ FUNCDESC *pFuncDesc) As HRESULT 1415 1416 virtual /* [local] */ void STDMETHODCALLTYPE ReleaseVarDesc( 1417 /* [in] */ VARDESC *pVarDesc) As HRESULT 1418 1419 }; 1320 TypeDef LPTYPEINFO = /* [unique] */ *ITypeInfo 1321 1322 Dim IID_ITypeInfo = [&H00020401, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1323 1324 Interface ITypeInfo 1325 Inherits IUnknown 1326 1327 Function /* [local] */ GetTypeAttr( 1328 /* [out] */ ByRef pTypeAttr As *TYPEATTR) As HRESULT 1329 1330 Function GetTypeComp( 1331 /* [out] */ ByRef pTComp As *ITypeComp) As HRESULT 1332 1333 Function /* [local] */ GetFuncDesc( 1334 /* [in] */ index As DWord, 1335 /* [out] */ ByRef pFuncDesc As *FUNCDESC) As HRESULT 1336 1337 Function /* [local] */ GetVarDesc( 1338 /* [in] */ index As DWord, 1339 /* [out] */ ByRef pVarDesc As *VARDESC) As HRESULT 1340 1341 Function /* [local] */ GetNames( 1342 /* [in] */ memid As MEMBERID, 1343 /* [length_is][size_is][out] */ rgBstrNames As *BSTR, 1344 /* [in] */ cMaxNames As DWord, 1345 /* [out] */ ByRef cNames As DWord) As HRESULT 1346 1347 Function GetRefTypeOfImplType( 1348 /* [in] */ index As DWord, 1349 /* [out] */ ByRef RefType As HREFTYPE) As HRESULT 1350 1351 Function GetImplTypeFlags( 1352 /* [in] */ index As DWord, 1353 /* [out] */ ByRef ImplTypeFlags As Long) As HRESULT 1354 1355 Function /* [local] */ GetIDsOfNames( 1356 /* [size_is][in] */ rgszNames As *LPOLESTR, 1357 /* [in] */ cNames As DWord, 1358 /* [size_is][out] */ pMemId As *MEMBERID) As HRESULT 1359 1360 Function /* [local] */ Invoke( 1361 /* [in] */ pvInstance As VoidPtr, 1362 /* [in] */ memid As MEMBERID, 1363 /* [in] */ wFlags As Word, 1364 /* [out][in] */ ByRef DispParams As DISPPARAMS, 1365 /* [out] */ ByRef VarResult As VARIANT, 1366 /* [out] */ ByRef ExcepInfo As EXCEPINFO, 1367 /* [out] */ ByRef uArgErr As DWord) As HRESULT 1368 1369 Function /* [local] */ GetDocumentation( 1370 /* [in] */ memid As MEMBERID, 1371 /* [out] */ ByRef BstrName As BSTR, 1372 /* [out] */ ByRef BstrDocString As BSTR, 1373 /* [out] */ ByRef dwHelpContext As DWord, 1374 /* [out] */ ByRef BstrHelpFile As BSTR) As HRESULT 1375 1376 Function /* [local] */ GetDllEntry( 1377 /* [in] */ memid As MEMBERID, 1378 /* [in] */ invKind As INVOKEKIND, 1379 /* [out] */ ByRef BstrDllName As BSTR, 1380 /* [out] */ ByRef BstrName As BSTR, 1381 /* [out] */ ByRef wOrdinal As Word) As HRESULT 1382 1383 Function GetRefTypeInfo( 1384 /* [in] */ hRefType As HREFTYPE, 1385 /* [out] */ ByRef pTInfo As *ITypeInfo) As HRESULT 1386 1387 Function /* [local] */ AddressOfMember( 1388 /* [in] */ memid As MEMBERID, 1389 /* [in] */ invKind As INVOKEKIND, 1390 /* [out] */ ByRef pv As VoidPtr) As HRESULT 1391 1392 Function /* [local] */ CreateInstance( 1393 /* [in] */ pUnkOuter As *IUnknown, 1394 /* [in] */ ByRef riid As IID, 1395 /* [iid_is][out] */ ByRef pvObj As Any) As HRESULT 1396 1397 Function GetMops( 1398 /* [in] */ memid As MEMBERID, 1399 /* [out] */ ByRef BstrMops As BSTR) As HRESULT 1400 1401 Function /* [local] */ GetContainingTypeLib( 1402 /* [out] */ ByRef pTLib As *ITypeLib, 1403 /* [out] */ ByRef Index As UINT) As HRESULT 1404 1405 Function /* [local] */ void STDMETHODCALLTYPE ReleaseTypeAttr( 1406 /* [in] */ pTypeAttr As *TYPEATTR) As HRESULT 1407 1408 Function /* [local] */ void STDMETHODCALLTYPE ReleaseFuncDesc( 1409 /* [in] */ pFuncDesc As *FUNCDESC) As HRESULT 1410 1411 Function /* [local] */ void STDMETHODCALLTYPE ReleaseVarDesc( 1412 /* [in] */ pVarDesc As *VARDESC) As HRESULT 1413 End Interface 1420 1414 1421 1415 #endif /* __ITypeInfo_INTERFACE_DEFINED__ */ 1422 1423 1416 1424 1417 #ifndef __ITypeInfo2_INTERFACE_DEFINED__ … … 1428 1421 /* [unique][uuid][object] */ 1429 1422 1430 TypeDef /* [unique] */ ITypeInfo2 *LPTYPEINFO2; 1431 1432 1433 EXTERN_C const IID IID_ITypeInfo2; 1434 1435 MIDL_INTERFACE("00020412-0000-0000-C000-000000000046") 1436 ITypeInfo2 : public ITypeInfo 1437 { 1438 public: 1439 Function GetTypeKind( 1440 /* [out] */ TYPEKIND *pTypeKind) As HRESULT 1441 1442 Function GetTypeFlags( 1443 /* [out] */ ULONG *pTypeFlags) As HRESULT 1444 1445 Function GetFuncIndexOfMemId( 1446 /* [in] */ MEMBERID memid, 1447 /* [in] */ INVOKEKIND invKind, 1448 /* [out] */ UINT *pFuncIndex) As HRESULT 1449 1450 Function GetVarIndexOfMemId( 1451 /* [in] */ MEMBERID memid, 1452 /* [out] */ UINT *pVarIndex) As HRESULT 1453 1454 Function GetCustData( 1455 /* [in] */ REFGUID guid, 1456 /* [out] */ VARIANT *pVarVal) As HRESULT 1457 1458 Function GetFuncCustData( 1459 /* [in] */ UINT index, 1460 /* [in] */ REFGUID guid, 1461 /* [out] */ VARIANT *pVarVal) As HRESULT 1462 1463 Function GetParamCustData( 1464 /* [in] */ UINT indexFunc, 1465 /* [in] */ UINT indexParam, 1466 /* [in] */ REFGUID guid, 1467 /* [out] */ VARIANT *pVarVal) As HRESULT 1468 1469 Function GetVarCustData( 1470 /* [in] */ UINT index, 1471 /* [in] */ REFGUID guid, 1472 /* [out] */ VARIANT *pVarVal) As HRESULT 1473 1474 Function GetImplTypeCustData( 1475 /* [in] */ UINT index, 1476 /* [in] */ REFGUID guid, 1477 /* [out] */ VARIANT *pVarVal) As HRESULT 1478 1479 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation2( 1480 /* [in] */ MEMBERID memid, 1481 /* [in] */ LCID lcid, 1482 /* [out] */ BSTR *pbstrHelpString, 1483 /* [out] */ DWORD *pdwHelpStringContext, 1484 /* [out] */ BSTR *pbstrHelpStringDll) As HRESULT 1485 1486 Function GetAllCustData( 1487 /* [out] */ CUSTDATA *pCustData) As HRESULT 1488 1489 Function GetAllFuncCustData( 1490 /* [in] */ UINT index, 1491 /* [out] */ CUSTDATA *pCustData) As HRESULT 1492 1493 Function GetAllParamCustData( 1494 /* [in] */ UINT indexFunc, 1495 /* [in] */ UINT indexParam, 1496 /* [out] */ CUSTDATA *pCustData) As HRESULT 1497 1498 Function GetAllVarCustData( 1499 /* [in] */ UINT index, 1500 /* [out] */ CUSTDATA *pCustData) As HRESULT 1501 1502 Function GetAllImplTypeCustData( 1503 /* [in] */ UINT index, 1504 /* [out] */ CUSTDATA *pCustData) As HRESULT 1505 1506 }; 1507 1423 TypeDef LPTYPEINFO2 = /* [unique] */ *ITypeInfo2 1424 1425 Dim IID_ITypeInfo2 = [&H00020412, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1426 1427 Interface ITypeInfo2 1428 Inherits ITypeInfo 1429 1430 Function GetTypeKind( 1431 /* [out] */ ByRef TypeKind As TYPEKIND) As HRESULT 1432 Function GetTypeFlags( 1433 /* [out] */ ByRef TypeFlags As DWord) As HRESULT 1434 Function GetFuncIndexOfMemId( 1435 /* [in] */ memid As MEMBERID, 1436 /* [in] */ invKind As INVOKEKIND, 1437 /* [out] */ ByRef FuncIndex As DWord) As HRESULT 1438 Function GetVarIndexOfMemId( 1439 /* [in] */ memid As MEMBERID, 1440 /* [out] */ ByRef pVarIndex As DWord) As HRESULT 1441 Function GetCustData( 1442 /* [in] */ ByRef guid As GUID, 1443 /* [out] */ ByRef VarVal As VARIANT) As HRESULT 1444 Function GetFuncCustData( 1445 /* [in] */ index As DWord, 1446 /* [in] */ ByRef guid As GUID, 1447 /* [out] */ ByRef VarVal As VARIANT) As HRESULT 1448 Function GetParamCustData( 1449 /* [in] */ indexFunc As DWord, 1450 /* [in] */ indexParam As DWord, 1451 /* [in] */ ByRef guid As GUID, 1452 /* [out] */ ByRef VarVal As VARIANT) As HRESULT 1453 Function GetVarCustData( 1454 /* [in] */ UINT index, 1455 /* [in] */ ByRef guid As GUID, 1456 /* [out] */ ByRef VarVal As VARIANT) As HRESULT 1457 Function GetImplTypeCustData( 1458 /* [in] */ UINT index, 1459 /* [in] */ ByRef guid As GUID, 1460 /* [out] */ ByRef VarVal As VARIANT) As HRESULT 1461 virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDocumentation2( 1462 /* [in] */ memid As MEMBERID, 1463 /* [in] */ lcid As LCID, 1464 /* [out] */ ByRef bstrHelpString As BSTR, 1465 /* [out] */ ByRef dwHelpStringContext As DWord, 1466 /* [out] */ ByRef bstrHelpStringDll As BSTR) As HRESULT 1467 Function GetAllCustData( 1468 /* [out] */ ByRef CustData As CUSTDATA) As HRESULT 1469 Function GetAllFuncCustData( 1470 /* [in] */ index As DWord, 1471 /* [out] */ ByRef CustData As CUSTDATA) As HRESULT 1472 Function GetAllParamCustData( 1473 /* [in] */ indexFunc As DWord, 1474 /* [in] */ indexParam As DWord, 1475 /* [out] */ ByRef CustData As CUSTDATA) As HRESULT 1476 Function GetAllVarCustData( 1477 /* [in] */ index As DWord, 1478 /* [out] */ ByRef CustData As CUSTDATA) As HRESULT 1479 Function GetAllImplTypeCustData( 1480 /* [in] */ index As DWord, 1481 /* [out] */ ByRef CustData As CUSTDATA) As HRESULT 1482 End Interface 1508 1483 1509 1484 #endif /* __ITypeInfo2_INTERFACE_DEFINED__ */ 1510 1485 1486 #ifdef __UNDECLARED__ 1511 1487 1512 1488 #ifndef __ITypeLib_INTERFACE_DEFINED__ … … 1516 1492 /* [unique][uuid][object] */ 1517 1493 1518 TypeDef/* [v1_enum] */1519 enum tagSYSKIND1520 { SYS_WIN16 = 0, 1521 SYS_WIN32 = SYS_WIN16 + 1 ,1522 SYS_MAC = SYS_WIN32 + 1 ,1494 /* [v1_enum] */ 1495 Enum SYSKIND 1496 SYS_WIN16 = 0 1497 SYS_WIN32 = SYS_WIN16 + 1 1498 SYS_MAC = SYS_WIN32 + 1 1523 1499 SYS_WIN64 = SYS_MAC + 1 1524 } SYSKIND; 1525 1526 TypeDef/* [v1_enum] */1527 enum tagLIBFLAGS1528 { LIBFLAG_FRESTRICTED = 0x1, 1529 LIBFLAG_FCONTROL = 0x2,1530 LIBFLAG_FHIDDEN = 0x4,1531 LIBFLAG_FHASDISKIMAGE = 0x81532 } LIBFLAGS; 1500 End Enum 1501 1502 /* [v1_enum] */ 1503 Enum LIBFLAGS 1504 LIBFLAG_FRESTRICTED = &h1 1505 LIBFLAG_FCONTROL = &h2 1506 LIBFLAG_FHIDDEN = &h4 1507 LIBFLAG_FHASDISKIMAGE = &h8 1508 End Enum 1533 1509 1534 1510 TypeDef /* [unique] */ ITypeLib *LPTYPELIB; 1535 1511 1536 TypeDef struct tagTLIBATTR 1537 { 1538 GUID guid; 1539 LCID lcid; 1540 SYSKIND syskind; 1541 WORD wMajorVerNum; 1542 WORD wMinorVerNum; 1543 WORD wLibFlags; 1544 } TLIBATTR; 1512 Type TLIBATTR 1513 guid As GUID 1514 lcid As LCID 1515 syskind As SYSKIND 1516 wMajorVerNum As Word 1517 wMinorVerNum As Word 1518 wLibFlags As Word 1519 End Type 1545 1520 1546 1521 TypeDef struct tagTLIBATTR *LPTLIBATTR; -
Include/api_window.sbp
r9 r77 204 204 ' Window API 205 205 206 Declare Function AdjustWindowRect Lib "user32"(ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL 207 Declare Function AdjustWindowRectEx Lib "user32"(ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL 206 Declare Function AdjustWindowRect Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL 207 Declare Function AdjustWindowRectEx Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL 208 Declare Function AnyPopup Lib "user32" () As BOOL 209 Declare Function ArrangeIconicWindows Lib "user32" (hWnd As HWND) As DWord 208 210 209 211 Type PAINTSTRUCT … … 215 217 rgbReserved(31) As Byte 216 218 End Type 217 Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As HDC219 Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC 218 220 219 221 Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long … … 800 802 Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL 801 803 802 Declare Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (ByRef lpwcx As WNDCLASSEX) As BOOL804 Declare Function RegisterClassEx Lib "user32" Alias "RegisterClassExA" (ByRef wcx As WNDCLASSEX) As ATOM 803 805 Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (lpszFormat As PCSTR) As DWord 804 806 Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (lpString As PCSTR) As DWord … … 809 811 Declare Function TranslateMessage Lib "user32" (ByRef lpMsg As MSG) As Long 810 812 Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL 811 Declare Function ScrollDC Lib "user32" (hdc As HDC, dx As Long, dy As Long, ByRef lprcScroll As RECT, ByRef lprcClip As RECT, hrgnUpdate As HRGN, ByRef lprcUpdate As RECT) As BOOL813 Declare Function ScrollDC Lib "user32" (hdc As HDC, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT) As BOOL 812 814 813 815 Const SW_SCROLLCHILDREN = &H0001 814 816 Const SW_INVALIDATE = &H0002 815 817 Const SW_ERASE = &H0004 816 Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef lprcScroll As RECT, ByRef lprcClip As RECT, hrgnUpdate As HRGN, ByRef lprcUpdate As RECT, flags As DWord) As BOOL818 Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT, flags As DWord) As BOOL 817 819 818 820 Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT -
Include/windows/WindowHandle.sbp
r42 r77 1 1 #ifndef __WINDOWSHANDLE_SBP__ 2 2 #define __WINDOWSHANDLE_SBP__ 3 4 #ifdef _WIN64 5 Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR 6 Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 7 #else 8 Declare Function _System_GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR 9 Declare Function _System_SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 10 #endif 11 Declare Function _System_GetParent Lib "user32" Alias "GetParent" (hWnd As HWND) As HWND 12 Declare Function _System_SetParent Lib "user32" Alias "SetParent" (hWnd As HWND) As HWND 13 Declare Function _System_GetMenu Lib "user32" Alias "GetMenu" (hWnd As HWND) As HMENU 14 Declare Function _System_SetMenu Lib "user32" Alias "SetMenu" (hWnd As HWND) As HMENU 15 Declare Function _System_InvalidateRect Lib "user32" Alias "InvalidateRect" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL 16 Declare Function _System_InvalidateRgn Lib "user32" Alias "InvalidateRgn" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL 17 Declare Function _System_ValidateRect Lib "user32" Alias "ValidateRect" (hWnd As HWND, ByRef Rect As RECT) As BOOL 18 Declare Function _System_ValidateRgn Lib "user32" Alias "ValidateRgn" (hWnd As HWND, hRgn As HRGN) As BOOL 19 Declare Function _System_BeginPaint Lib "user32" Alias "BeginPaint" (hWnd As HWND, ByRef ps As PAINTSTRUCT) As HDC 20 Declare Function _System_EndPaint Lib "user32" Alias "EndPaint" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As HDC 21 Declare Function _System_ClientToScreen Lib "user32" Alias "ClientToScreen" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL 22 Declare Function _System_ScreenToClient Lib "user32" Alias "ScreenToClient" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL 23 Declare Function _System_CreateCaret Lib "user32" Alias "CreateCaret" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL 24 Declare Function _System_HideCaret Lib "user32" Alias "HideCaret" (hWnd As HWND) As BOOL 25 Declare Function _System_ShowCaret Lib "user32" Alias "ShowCaret" (hWnd As HWND) As BOOL 26 Declare Function _System_DrawMenuBar Lib "user32" Alias "DrawMenuBar" (hwnd As HWND) As BOOL 27 Declare Function _System_GetWindowRect Lib "user32" Alias "DrawMenuBar" (hWnd As HWND, ByRef Rect As RECT) As BOOL 28 Declare Function _System_IsWindow Lib "user32" Alias "IsWindow" (hWnd As HWND) As BOOL 29 Declare Function _System_Isiconic Lib "user32" Alias "Isiconic" (hWnd As HWND) As BOOL 30 Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef lpRect As RECT) As BOOL 3 31 4 32 Class WindowHandle … … 21 49 End Sub 22 50 23 Function HWnd() As HWND51 Const Function HWnd() As HWND 24 52 Return hwnd 25 53 End Function 26 54 27 Function Operator() As HWND55 Const Function Operator() As HWND 28 56 Return hwnd 29 57 End Function 30 58 59 Function BringToTop() As BOOL 60 Return BringWindowToTop(hwnd) 61 End Function 62 31 63 Function BeginPaint(ByRef ps As PAINTSTRUCT) As HDC 32 Return BeginPaint(hwnd, ps)33 End Function 34 35 Function ChildFromPoint(x As Long, y As Long) As HWND64 Return _System_BeginPaint(hwnd, ps) 65 End Function 66 67 Const Function ChildFromPoint(x As Long, y As Long) As HWND 36 68 Return ChildWindowFromPoint(hwnd, x, y) 37 69 End Function 38 70 39 Function ChildFromPointEx(x As Long, y As Long, flags As DWord) As HWND71 Const Function ChildFromPointEx(x As Long, y As Long, flags As DWord) As HWND 40 72 Return ChildWindowFromPointEx(hwnd, x, y, flags) 41 73 End Function 42 74 43 Function ClientToScreen(ByRef pt As POINTAPI) As BOOL44 Return ClientToScreen(pt)75 Const Function ClientToScreen(ByRef pt As POINTAPI) As BOOL 76 Return _System_ClientToScreen(hwnd, pt) 45 77 End Function 46 78 47 79 Function Close() As BOOL 48 Return CloseWindow( )80 Return CloseWindow(hwnd) 49 81 End Function 50 82 51 83 Function CreateCaret(hbmp As HBITMAP, width As Long, height As Long) As BOOL 52 Return CreateCaret(hwnd, hbmp, width, hegiht)84 Return _System_CreateCaret(hwnd, hbmp, width, hegiht) 53 85 End Function 54 86 … … 58 90 59 91 Function DrawMenuBar() As BOOL 60 Return DrawMenuBar(hwnd)92 Return _System_DrawMenuBar(hwnd) 61 93 End Function 62 94 … … 70 102 71 103 Function EndPaint(ByRef ps As PAINTSTRUCT) As BOOL 72 Return EndPaint(hwnd, ps)73 End Function 74 75 Function EnumChilds(enumFunc As WNDENUMPROC, lp As LPARAM) As BOOL104 Return _System_EndPaint(hwnd, ps) 105 End Function 106 107 Const Function EnumChilds(enumFunc As WNDENUMPROC, lp As LPARAM) As BOOL 76 108 Return EnumChildWindows(hwnd, enumFunc, lp) 77 109 End Function … … 81 113 End Function 82 114 83 Function GetClassLongPtr(index As Long) As LONG_PTR115 Const Function GetClassLongPtr(index As Long) As LONG_PTR 84 116 Return GetClassLongPtr(hwnd, index) 85 117 End Function 86 118 87 Function GetClassName(className As PSTR, maxCount As Long) As Long119 Const Function GetClassName(className As PSTR, maxCount As Long) As Long 88 120 Return GetClassName(className, maxCount) 89 121 End Function 90 122 91 Function GetClientRect(ByRef rc As RECT) As BOOL 92 Return GetClientRect(hwnd, rc) 123 Const Function GetClientRect(ByRef rc As RECT) As BOOL 124 Return _System_GetClientRect(hwnd, rc) 125 End Function 126 127 Const Function GetContextHelpId() As DWord 128 Return GetWindowContextHelpId(hwnd) 93 129 End Function 94 130 … … 101 137 End Function 102 138 103 Function GetDlgCtrlID() As Long139 Const Function GetDlgCtrlID() As Long 104 140 Return GetDlgCtrlID(hwnd) 105 141 End Function 106 142 107 Function GetDlgItem(idDlgItem As Long) As WindowHandle143 Const Function GetDlgItem(idDlgItem As Long) As WindowHandle 108 144 Return GetDlgItem(hwnd, idDlgItem) 109 145 End Function 110 146 111 Function GetDlgItemText(idDlgItem As Long, ps As PSTR, maxCount As Long) As Long147 Const Function GetDlgItemText(idDlgItem As Long, ps As PSTR, maxCount As Long) As Long 112 148 Return GetDlgItemText(hwnd, idDlgItem, ps, maxCount) 113 149 End Function 114 150 115 Function GetMenu() As HMENU 116 Return GetMenu(hwnd) 117 End Function 118 119 Function GetParent() As WindowHandle 120 Return GetParent(hwnd) 121 End Function 122 123 Function GetProp(psz As PCSTR) As HANDLE 151 Const Function GetMenu() As HMENU 152 Return _System_GetMenu(hwnd) 153 End Function 154 155 Const Function GetParent() As WindowHandle 156 Dim w As WindowHandle(_System_GetParent(hwnd)) 157 Return w 158 End Function 159 160 Const Function GetProp(psz As PCSTR) As HANDLE 124 161 Return GetProp(hwnd, psz) 125 162 End Function 126 163 127 Function GetProp(atom As ATOM) As HANDLE164 Const Function GetProp(atom As ATOM) As HANDLE 128 165 Return GetProp(hwnd, atom As ULONG_PTR As PCSTR) 129 166 End Function 130 167 131 Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As BOOL168 Const Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As BOOL 132 169 Return GetScrollInfo(hwnd, fnBar, si) 133 170 End Function 134 171 135 Function GetSystemMenu(revert As BOOL) As HMENU172 Const Function GetSystemMenu(revert As BOOL) As HMENU 136 173 Return GetSystemMenu(hwnd, revert) 137 174 End Function 138 175 139 Function GetUpdateRect(ByRef rc As RECT, erase As BOOL) As BOOL176 Const Function GetUpdateRect(ByRef rc As RECT, erase As BOOL) As BOOL 140 177 Return GetUpdateRact(hwnd, rc, erase) 141 178 End Function 142 179 143 Function GetUpdateRgn(hrgn As HRGN, erase As BOOL) As BOOL180 Const Function GetUpdateRgn(hrgn As HRGN, erase As BOOL) As BOOL 144 181 Return GetUpdateRgn(hwnd, hrgn, erase) 145 182 End Function 146 183 147 Function GetWindow(cmd As DWord) As WindowHandle184 Const Function GetWindow(cmd As DWord) As WindowHandle 148 185 Return GetWindow(hwnd, cmd) 149 End Function150 151 Function GetWindowPlacement(ByRef wndpl As WINDOWPLACEMENT) As BOOL152 Return GetWindowPlacement(hwnd, wndpl)153 End Function154 155 Function GetContextHelpId() As DWord156 Return GetWindowContextHelpId(hwnd)157 186 End Function 158 187 … … 161 190 End Function 162 191 163 Function GetWindowLongPtr(index As Long) As LONG_PTR164 Return GetWindowLongPtr(hwnd, index)165 End Function 166 167 Function GetWindowPlasement(ByRef wndpl As WINDOWPLACEMENT) As BOOL192 Const Function GetWindowLongPtr(index As Long) As LONG_PTR 193 Return _System_GetWindowLongPtr(hwnd, index) 194 End Function 195 196 Const Function GetWindowPlasement(ByRef wndpl As WINDOWPLACEMENT) As BOOL 168 197 Return GetWindowPlasement(hwnd, wndpl) 169 198 End Function 170 199 171 Function GetWindowRect(ByRef rc As RECT) As BOOL172 Return GetWindowRect(rc)173 End Function 174 175 Function GetText(ps As PSTR, maxCount As Long) As BOOL200 Const Function GetWindowRect(ByRef rc As RECT) As BOOL 201 Return _System_GetWindowRect(rc) 202 End Function 203 204 Const Function GetText(ps As PSTR, maxCount As Long) As BOOL 176 205 Return GetWindowText(ps, maxCount) 177 206 End Function 178 207 179 Function GetTextLength() As Long208 Const Function GetTextLength() As Long 180 209 Return GetWindowTextLength(hwnd) 181 210 End Function 182 211 183 Function GetWindowThreadId() As DWord212 Const Function GetWindowThreadId() As DWord 184 213 Return GetWindowProcessThreadId(hwnd, 0) 185 214 End Function 186 215 187 Function GetWindowProcessThreadId(ByRef processId As DWord) As DWord216 Const Function GetWindowProcessThreadId(ByRef processId As DWord) As DWord 188 217 Return GetWindowProcessThreadId(hwnd, processId) 189 218 End Function 190 219 191 220 Function HideCaret() As BOOL 192 Return HideCaret(hwnd)221 Return _System_HideCaret(hwnd) 193 222 End Function 194 223 195 224 Function InvalidateRect(ByRef rc As RECT, erace As BOOL) As BOOL 196 Return InvalidateRect(hwnd, rc, erace)225 Return _System_InvalidateRect(hwnd, rc, erace) 197 226 End Function 198 227 199 228 Function InvalidateRect(ByRef rc As RECT) As BOOL 200 Return InvalidateRect(hwnd, rc, TRUE)229 Return _System_InvalidateRect(hwnd, rc, TRUE) 201 230 End Function 202 231 203 232 Function InvalidateRgn(hrgn As HRGN, erace As BOOL) As BOOL 204 Return InvalidateRgn(hwnd, hrgn, erace)233 Return _System_InvalidateRgn(hwnd, hrgn, erace) 205 234 End Function 206 235 207 236 Function InvalidateRgn(hrgn As HRGN) As BOOL 208 Return InvalidateRgn(hwnd, hrgn, TRUE)237 Return _System_InvalidateRgn(hwnd, hrgn, TRUE) 209 238 End Function 210 239 211 240 Function Invalidate(erace As BOOL) As BOOL 212 Return InvalidateRect(hwnd, ByVal 0, erace)241 Return _System_InvalidateRect(hwnd, ByVal 0, erace) 213 242 End Function 214 243 215 244 Function Invalidate() As BOOL 216 Return InvalidateRect(hwnd, ByVal 0, TRUE)217 End Function 218 219 Function IsChild(hwnd As HWND) As BOOL245 Return _System_InvalidateRect(hwnd, ByVal 0, TRUE) 246 End Function 247 248 Const Function IsChild(hwnd As HWND) As BOOL 220 249 Return IsChild(This.hwnd, hwnd) 221 250 End Function 222 251 223 Function IsDialogMessage(ByRef msg As MSG) As BOOL252 Const Function IsDialogMessage(ByRef msg As MSG) As BOOL 224 253 Return IsDialogMessage(hwnd, msg) 225 254 End Function 226 255 227 Function IsIconic() As BOOL228 Return IsIconic(hwnd)229 End Function 230 231 Function IsWindow() As BOOL232 Return IsWindow(hwnd)233 End Function 234 235 Function IsEnabled() As BOOL256 Const Function IsIconic() As BOOL 257 Return _System_IsIconic(hwnd) 258 End Function 259 260 Const Function IsWindow() As BOOL 261 Return _System_IsWindow(hwnd) 262 End Function 263 264 Const Function IsEnabled() As BOOL 236 265 Return IsWindowEnabled(hwnd) 237 266 End Function 238 267 239 Function IsUnicode() As BOOL268 Const Function IsUnicode() As BOOL 240 269 Return IsWindowUnicode(hwnd) 241 270 End Function 242 271 243 Function IsVisible() As BOOL272 Const Function IsVisible() As BOOL 244 273 Return IsWindowVisible(hwnd) 245 274 End Function 246 275 247 Function IsZoomed() As BOOL276 Const Function IsZoomed() As BOOL 248 277 Return IsZoomed(hwnd) 249 278 End Function … … 265 294 End Function 266 295 267 Function MessageBox(text As PCSTR, caption As PCSTR, uType As DWord) As Long296 Const Function MessageBox(text As PCSTR, caption As PCSTR, uType As DWord) As Long 268 297 Return MessageBox(hwnd, text, caption, uType) 269 298 End Function 270 299 271 Function MessageBox(text As PCSTR, caption As PCSTR) As Long300 Const Function MessageBox(text As PCSTR, caption As PCSTR) As Long 272 301 Return MessageBox(hwnd, text, caption, MB_OK) 273 302 End Function 274 303 275 Function MessageBox(text As PCSTR) As Long304 Const Function MessageBox(text As PCSTR) As Long 276 305 Return MessageBox(hwnd, text, 0, MB_OK) 277 306 End Function 278 307 279 Function Move Window(x As Long, y As Long, width As Long, height As Long, repaint As BOOL) As BOOL308 Function Move(x As Long, y As Long, width As Long, height As Long, repaint As BOOL) As BOOL 280 309 Return MoveWindow(hwnd, x, y, width, height, repaint) 281 310 End Function 282 311 283 Function Move Window(x As Long, y As Long, width As Long, height As Long) As BOOL312 Function Move(x As Long, y As Long, width As Long, height As Long) As BOOL 284 313 Return MoveWindow(hwnd, x, y, width, height, TRUE) 285 314 End Function 286 315 287 Function Move Window(ByRef rc As RECT, repeaint As BOOL) As BOOL316 Function Move(ByRef rc As RECT, repeaint As BOOL) As BOOL 288 317 With rc 289 318 Return MoveWindow(hwnd, .left, .top, .right - .left, .bottom - .top, repaint) … … 291 320 End Function 292 321 293 Function Move Window(ByRef rc As RECT) As BOOL322 Function Move(ByRef rc As RECT) As BOOL 294 323 With rc 295 324 Return MoveWindow(hwnd, .left, .top, .right - .left, .bottom - .top, TRUE) … … 329 358 End Function 330 359 331 Function ScreenToClient(ByRef pt As POINTAPI) As BOOL332 Return ScreenToClient(hwnd, pt)360 Const Function ScreenToClient(ByRef pt As POINTAPI) As BOOL 361 Return _System_ScreenToClient(hwnd, pt) 333 362 End Function 334 363 … … 378 407 379 408 Function SetMenu(hmenu As HMENU) As BOOL 380 Return SetMenu(hwnd, hmenu)409 Return _System_SetMenu(hwnd, hmenu) 381 410 End Function 382 411 383 412 Function SetParent(hwndNewParent As HWND) As HWND 384 Return SetParent(hwnd, hwndNewParent)413 Return _System_SetParent(hwnd, hwndNewParent) 385 414 End Function 386 415 … … 414 443 415 444 Function SetWindowLongPtr(index As Long, newLong As LONG_PTR) As LONG_PTR 416 Return SetWindowLongPtr(hwnd, index, newLong)445 Return _System_SetWindowLongPtr(hwnd, index, newLong) 417 446 End Function 418 447 … … 443 472 End Function 444 473 474 Function ShowCaret() As BOOL 475 Return _System_ShowCaret(hwnd) 476 End Function 477 445 478 Function ShowScrollBar(bar As DWord, show As BOOL) As BOOL 446 479 Return ShowScrollBar(hwnd, bar, show) … … 464 497 465 498 Function ValidateRect(ByRef rc As RECT) As BOOL 466 Return ValidateRect(hwnd, rc)499 Return _System_ValidateRect(hwnd, rc) 467 500 End Function 468 501 469 502 Function ValidateRgn(hrgn As HRGN) As BOOL 470 Return ValidateRgn(hwnd, hrgn)503 Return _System_ValidateRgn(hwnd, hrgn) 471 504 End Function 472 505 473 506 Function Validate() As BOOL 474 Return ValidateRect(hwnd, ByVal 0)507 Return _System_ValidateRect(hwnd, ByVal 0) 475 508 End Function 476 509 477 510 ' Get/SetWindowLongPtr Wrappers 478 511 479 Function GetExStyle() As DWord480 Return GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord481 End Function 482 483 Function GetStyle() As DWord484 Return GetWindowLongPtr(hwnd, GWL_STYLE) As DWord485 End Function 486 487 Function GetWndProc() As WNDPROC488 Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC489 End Function 490 491 Function GetInstance() As HINSTANCE492 Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE493 End Function 494 495 Function GetUserData() As LONG_PTR496 Return GetWindowLongPtr(hwnd, GWLP_USERDATA)512 Const Function GetExStyle() As DWord 513 Return _System_GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord 514 End Function 515 516 Const Function GetStyle() As DWord 517 Return _System_GetWindowLongPtr(hwnd, GWL_STYLE) As DWord 518 End Function 519 520 Const Function GetWndProc() As WNDPROC 521 Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC 522 End Function 523 524 Const Function GetInstance() As HINSTANCE 525 Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE 526 End Function 527 528 Const Function GetUserData() As LONG_PTR 529 Return _System_GetWindowLongPtr(hwnd, GWLP_USERDATA) 497 530 End Function 498 531 499 532 Function SetExStyle(style As DWord) As DWord 500 Return SetWindowLongPtr(hwnd, GWL_EXSTYLE, style) As DWord533 Return _System_SetWindowLongPtr(hwnd, GWL_EXSTYLE, style) As DWord 501 534 End Function 502 535 503 536 Function SetStyle(style As DWord) As DWord 504 Return SetWindowLongPtr(hwnd, GWL_STYLE, style) As DWord537 Return _System_SetWindowLongPtr(hwnd, GWL_STYLE, style) As DWord 505 538 End Function 506 539 507 540 Function SetWndProc(wndProc As WNDPROC) As WNDPROC 508 Return SetWindowLongPtR(hwnd, GWLP_WNDPROC, wndProc As WNDPROC) As WNDPROC541 Return _System_SetWindowLongPtR(hwnd, GWLP_WNDPROC, wndProc As WNDPROC) As WNDPROC 509 542 End Function 510 543 511 544 Function SetUserData(value As LONG_PTR) As LONG_PTR 512 Return SetWindowLongPtr(value As LONG_PTR)545 Return _System_SetWindowLongPtr(value As LONG_PTR) 513 546 End Function 514 547 515 548 ' Propaties 516 549 517 Function ClientRect() As RECT550 Const Function ClientRect() As RECT 518 551 Dim rc As RECT 519 GetClientRect(hwnd, rc)552 _System_GetClientRect(hwnd, rc) 520 553 Return rc 521 554 End Function … … 532 565 End Sub 533 566 534 Function WindowRect() As RECT567 Const Function WindowRect() As RECT 535 568 Dim rc As RECT 536 GetWindowRect(hwnd, rc)569 _System_GetWindowRect(hwnd, rc) 537 570 Return rc 538 571 End Function … … 542 575 End Sub 543 576 544 Function ContextHelpID() As DWord577 Const Function ContextHelpID() As DWord 545 578 Return GetContextHelpId(hwnd) 546 579 End Function 547 580 548 581 Sub ContextHelpID(newID As DWord) 549 SetContextHelpId(hwnd, newId)550 End Sub 551 552 Function DlgCtrlID() As Long582 _System_SetContextHelpId(hwnd, newId) 583 End Sub 584 585 Const Function DlgCtrlID() As Long 553 586 Return GetDlgCtrlID(hwnd) 554 587 End Function 555 588 556 589 Sub DlgCtrlId(newId As Long) 557 SetWindowLongPtr(hwnd, GWLP_ID, newId)590 _System_SetWindowLongPtr(hwnd, GWLP_ID, newId) 558 591 End Sub 559 592 560 593 Function DlgItem(idDlgItem As Long) As WindowHandle 561 Return GetDlgItem(hwnd, idDlgItem) 562 End Function 563 564 Function ExStyle() As DWord 565 Return GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord 594 Dim w As WindowHandle(GetDlgItem(hwnd, idDlgItem)) 595 Return w 596 End Function 597 598 Const Function ExStyle() As DWord 599 Return _System_GetWindowLongPtr(hwnd, GWL_EXSTYLE) As DWord 566 600 End Function 567 601 568 602 Sub ExStyle(newExStyle As DWord) 569 SetWindowLongPtr(hwnd, GWL_EXSTYLE, newExStyle)570 End Sub 571 572 Function Style() As DWord573 Return GetWindowLongPtr(hwnd, GWL_STYLE) As DWord603 _System_SetWindowLongPtr(hwnd, GWLP_EXSTYLE, newExStyle) 604 End Sub 605 606 Const Function Style() As DWord 607 Return _System_GetWindowLongPtr(hwnd, GWL_STYLE) As DWord 574 608 End Function 575 609 576 610 Sub Style(newStyle As DWord) DWord 577 SetWindowLongPtr(hwnd, GWL_STYLE, newStyle)578 End Sub 579 580 Function Enabled() As BOOL611 _System_SetWindowLongPtr(hwnd, GWLP_STYLE, newStyle) 612 End Sub 613 614 Const Function Enabled() As BOOL 581 615 Return IsWindowEnabled(hwnd) 582 616 End Function … … 586 620 End Sub 587 621 588 Function Font() As HFONT622 Const Function Font() As HFONT 589 623 Return SendMessage(hwnd, WM_GETFONT, 0, 0) As HFONT 590 624 End Function … … 594 628 End Sub 595 629 596 Function Maximized() As BOOL630 Const Function Maximized() As BOOL 597 631 Return IsIconic(hwnd) 598 632 End Function … … 606 640 End Sub 607 641 608 Function Minimized() As BOOL642 Const Function Minimized() As BOOL 609 643 Return IsIconic(hwnd) 610 644 End Function … … 618 652 End Sub 619 653 620 Function Instance() As HINSTANCE621 Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE654 Const Function Instance() As HINSTANCE 655 Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As HINSTANCE 622 656 End Function 623 657 624 658 ' IsWindow, IsUnicodeはメソッドと同じ。 625 659 626 Function Parent() As WindowHandle627 Return GetParent(hwnd)660 Const Function Parent() As WindowHandle 661 Return _System_GetParent(hwnd) 628 662 End Function 629 663 630 664 Sub Parent(hwndNewParent As HWND) 631 SetParent(hwnd, hwndNewParent)632 End Sub 633 634 Function ProcessID() As DWord665 _System_SetParent(hwnd, hwndNewParent) 666 End Sub 667 668 Const Function ProcessID() As DWord 635 669 GetWindowProcessThreadId(ProcessID) 636 670 End Function 637 671 638 Function ThreadID() As DWord672 Const Function ThreadID() As DWord 639 673 Return GetWindowProcessThreadId(ByVal 0) 640 674 End Function 641 675 642 Function Menu() As HMENU643 Return GetMenu(hwnd)676 Const Function Menu() As HMENU 677 Return _System_GetMenu(hwnd) 644 678 End Function 645 679 646 680 Sub Menu(hmenuNew As HMENU) 647 SetMenu(hwnd, hmenuNew)648 End Sub 649 650 Function Text() As String681 _System_SetMenu(hwnd, hmenuNew) 682 End Sub 683 684 Const Function Text() As String 651 685 With Text 652 686 .ReSize(GetWindowTextLength(hwnd)) … … 659 693 End Sub 660 694 661 Function TextLength() As Long695 Const Function TextLength() As Long 662 696 Return GetWindowTextLength(hwnd) 663 697 End Function 664 698 665 Function UserData() As LONG_PTR666 Return GetWindowLongPtr(hwnd, GWLP_USERDATA)699 Const Function UserData() As LONG_PTR 700 Return _System_GetWindowLongPtr(hwnd, GWLP_USERDATA) 667 701 End Function 668 702 669 703 Sub UserData(newValue As LONG_PTR) 670 SetWindowLongPtr(hwnd, GWLP_USERDATA, newValue)671 End Sub 672 673 Function Visible() As BOOL704 _System_SetWindowLongPtr(hwnd, GWLP_USERDATA, newValue) 705 End Sub 706 707 Const Function Visible() As BOOL 674 708 Return IsVisible(hwnd) 675 709 End Function … … 683 717 End Sub 684 718 685 Function WindowPlacement() As WINDOWPLACEMENT719 Const Function WindowPlacement() As WINDOWPLACEMENT 686 720 WindowPlacement.length = Len(WindowPlacement) 687 721 GetWindowPlacement(hwnd, WindowPlacement) … … 692 726 End Sub 693 727 694 Function WndProc() As WNDPROC695 Return GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC728 Const Function WndProc() As WNDPROC 729 Return _System_GetWindowLongPtr(hwnd, GWLP_HINSTANCE) As WNDPROC 696 730 End Function 697 731 698 732 Sub WndProc(newWndProc As WNDPROC) 699 SetWindowLongPtr(hwnd, GWLP_WNDPROC, newWndProc As LONG_PTR)733 _System_SetWindowLongPtr(hwnd, GWLP_WNDPROC, newWndProc As LONG_PTR) 700 734 End Sub 701 735
Note:
See TracChangeset
for help on using the changeset viewer.