Changeset 272 for Include/windows/WindowHandle.sbp
- Timestamp:
- Jun 12, 2007, 7:24:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/windows/WindowHandle.sbp
r237 r272 5 5 6 6 #ifdef _WIN64 7 Declare Function _System_GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR 8 Declare Function _System_SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 7 9 Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR 8 10 Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 9 11 #else 12 Declare Function _System_GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR 13 Declare Function _System_SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR 10 14 Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR 11 15 Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR … … 31 35 Declare Function _System_Isiconic Lib "user32" Alias "Isiconic" (hWnd As HWND) As BOOL 32 36 Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef Rect As RECT) As BOOL 37 Declare Function _System_GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE 38 Declare Function _System_SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL 39 Declare Function _System_GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long 40 Declare Function _System_GetScrollInfo Lib "user32" Alias "GetScrollInfo" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL 41 Declare Function _System_SetScrollInfo Lib "user32" Alias "SetScrollInfo" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL 42 Declare Function _System_GetSystemMenu Lib "user32" Alias "GetSystemMenu" (hWnd As HWND, bRevert As BOOL) As HMENU 33 43 34 44 Class WindowHandle … … 116 126 117 127 Const Function GetClassLongPtr(index As Long) As LONG_PTR 118 Return GetClassLongPtr(hwnd, index)128 Return _System_GetClassLongPtr(hwnd, index) 119 129 End Function 120 130 121 131 Const Function GetClassName(className As PTSTR, maxCount As Long) As Long 122 Return GetClassName(className, maxCount)132 Return _System_GetClassName(className, maxCount) 123 133 End Function 124 134 … … 161 171 162 172 Const Function GetProp(str As String) As HANDLE 163 Return GetProp(hwnd, ToTCStr(str))173 Return _System_GetProp(hwnd, ToTCStr(str)) 164 174 End Function 165 175 166 176 Const Function GetProp(psz As PCTSTR) As HANDLE 167 Return GetProp(hwnd, psz)177 Return _System_GetProp(hwnd, psz) 168 178 End Function 169 179 170 180 Const Function GetProp(atom As ATOM) As HANDLE 171 Return GetProp(hwnd, atom As ULONG_PTR As PCTSTR)181 Return _System_GetProp(hwnd, atom As ULONG_PTR As PCTSTR) 172 182 End Function 173 183 174 184 Const Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As Boolean 175 Return GetScrollInfo(hwnd, fnBar, si) As Boolean185 Return _System_GetScrollInfo(hwnd, fnBar, si) As Boolean 176 186 End Function 177 187 … … 410 420 411 421 Function SetClassLongPtr(index As Long, newLong As LONG_PTR) As LONG_PTR 412 Return SetClassLongPtr(hwnd, index, newLong)422 Return _System_SetClassLongPtr(hwnd, index, newLong) 413 423 End Function 414 424 … … 430 440 431 441 Function SetProp(str As String, hData As HANDLE) As Boolean 432 Return SetProp(hwnd, ToTCStr(str), hData) As Boolean442 Return _System_SetProp(hwnd, ToTCStr(str), hData) As Boolean 433 443 End Function 434 444 435 445 Function SetProp(psz As PCTSTR, hData As HANDLE) As Boolean 436 Return SetProp(hwnd, psz, hData) As Boolean446 Return _System_SetProp(hwnd, psz, hData) As Boolean 437 447 End Function 438 448 439 449 Function SetProp(atom As ATOM, hData As HANDLE) As Boolean 440 Return SetProp( atom As ULONG_PTRAs PCTSTR, hData) As Boolean450 Return SetProp((atom As ULONG_PTR) As PCTSTR, hData) As Boolean 441 451 End Function 442 452 443 453 Function SetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO, redraw As Boolean) As Boolean 444 Return SetScrollInfo(hwnd, fnBar, si, redraw) As Boolean454 Return _System_SetScrollInfo(hwnd, fnBar, si, redraw) As Boolean 445 455 End Function 446 456 447 457 Function SetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As Boolean 448 Return SetScrollInfo(hwnd, fnBar, si, TRUE) As Boolean458 Return _System_SetScrollInfo(hwnd, fnBar, si, TRUE) As Boolean 449 459 End Function 450 460 … … 652 662 653 663 Const Function Maximized() As Boolean 654 Return IsIconic( hwnd) As Boolean664 Return IsIconic() As Boolean 655 665 End Function 656 666 … … 727 737 Const Function Text() As String 728 738 Dim size = GetWindowTextLength(hwnd) + 1 729 Dim p = _System_malloc(SizeOf (TCHAR) * size) As PTSTR739 Dim p = GC_malloc_atomic(SizeOf (TCHAR) * size) As PTSTR 730 740 Dim length = GetWindowText(hwnd, p, size) 731 Return New String(p, length As SIZE_T)741 Text = New String(p, length As Long) 732 742 End Function 733 743
Note:
See TracChangeset
for help on using the changeset viewer.