Ignore:
Timestamp:
Jun 12, 2007, 7:24:38 PM (17 years ago)
Author:
イグトランス (egtra)
Message:

StringBuilderを追加。String不変へ。共通の文字列操作関数をActiveBasic.Strings内に配置(設計に検討の余地あり)。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/windows/WindowHandle.sbp

    r237 r272  
    55
    66#ifdef _WIN64
     7Declare Function _System_GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
     8Declare Function _System_SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
    79Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
    810Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
    911#else
     12Declare Function _System_GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
     13Declare Function _System_SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
    1014Declare Function _System_GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
    1115Declare Function _System_SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, l As LONG_PTR) As LONG_PTR
     
    3135Declare Function _System_Isiconic Lib "user32" Alias "Isiconic" (hWnd As HWND) As BOOL
    3236Declare Function _System_GetClientRect Lib "user32" Alias "GetClientRect" (hWnd As HWND, ByRef Rect As RECT) As BOOL
     37Declare Function _System_GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
     38Declare Function _System_SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
     39Declare Function _System_GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
     40Declare Function _System_GetScrollInfo Lib "user32" Alias "GetScrollInfo" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
     41Declare Function _System_SetScrollInfo Lib "user32" Alias "SetScrollInfo" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
     42Declare Function _System_GetSystemMenu Lib "user32" Alias "GetSystemMenu" (hWnd As HWND, bRevert As BOOL) As HMENU
    3343
    3444Class WindowHandle
     
    116126
    117127    Const Function GetClassLongPtr(index As Long) As LONG_PTR
    118         Return GetClassLongPtr(hwnd, index)
     128        Return _System_GetClassLongPtr(hwnd, index)
    119129    End Function
    120130
    121131    Const Function GetClassName(className As PTSTR, maxCount As Long) As Long
    122         Return GetClassName(className, maxCount)
     132        Return _System_GetClassName(className, maxCount)
    123133    End Function
    124134
     
    161171
    162172    Const Function GetProp(str As String) As HANDLE
    163         Return GetProp(hwnd, ToTCStr(str))
     173        Return _System_GetProp(hwnd, ToTCStr(str))
    164174    End Function
    165175
    166176    Const Function GetProp(psz As PCTSTR) As HANDLE
    167         Return GetProp(hwnd, psz)
     177        Return _System_GetProp(hwnd, psz)
    168178    End Function
    169179
    170180    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)
    172182    End Function
    173183
    174184    Const Function GetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As Boolean
    175         Return GetScrollInfo(hwnd, fnBar, si) As Boolean
     185        Return _System_GetScrollInfo(hwnd, fnBar, si) As Boolean
    176186    End Function
    177187
     
    410420
    411421    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)
    413423    End Function
    414424
     
    430440
    431441    Function SetProp(str As String, hData As HANDLE) As Boolean
    432         Return SetProp(hwnd, ToTCStr(str), hData) As Boolean
     442        Return _System_SetProp(hwnd, ToTCStr(str), hData) As Boolean
    433443    End Function
    434444
    435445    Function SetProp(psz As PCTSTR, hData As HANDLE) As Boolean
    436         Return SetProp(hwnd, psz, hData) As Boolean
     446        Return _System_SetProp(hwnd, psz, hData) As Boolean
    437447    End Function
    438448
    439449    Function SetProp(atom As ATOM, hData As HANDLE) As Boolean
    440         Return SetProp(atom As ULONG_PTR As PCTSTR, hData) As Boolean
     450        Return SetProp((atom As ULONG_PTR) As PCTSTR, hData) As Boolean
    441451    End Function
    442452
    443453    Function SetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO, redraw As Boolean) As Boolean
    444         Return SetScrollInfo(hwnd, fnBar, si, redraw) As Boolean
     454        Return _System_SetScrollInfo(hwnd, fnBar, si, redraw) As Boolean
    445455    End Function
    446456
    447457    Function SetScrollInfo(fnBar As Long, ByRef si As SCROLLINFO) As Boolean
    448         Return SetScrollInfo(hwnd, fnBar, si, TRUE) As Boolean
     458        Return _System_SetScrollInfo(hwnd, fnBar, si, TRUE) As Boolean
    449459    End Function
    450460
     
    652662
    653663    Const Function Maximized() As Boolean
    654         Return IsIconic(hwnd) As Boolean
     664        Return IsIconic() As Boolean
    655665    End Function
    656666
     
    727737    Const Function Text() As String
    728738        Dim size = GetWindowTextLength(hwnd) + 1
    729         Dim p = _System_malloc(SizeOf (TCHAR) * size) As PTSTR
     739        Dim p = GC_malloc_atomic(SizeOf (TCHAR) * size) As PTSTR
    730740        Dim length = GetWindowText(hwnd, p, size)
    731         Return New String(p, length As SIZE_T)
     741        Text = New String(p, length As Long)
    732742    End Function
    733743
Note: See TracChangeset for help on using the changeset viewer.