Changeset 585 for trunk/ab5.0


Ignore:
Timestamp:
Aug 11, 2008, 10:37:02 PM (16 years ago)
Author:
NoWest
Message:

Joystickのクラスを作ってみました。

かなり前に作ったんですが、ココ最近の改良に合わせて色々弄っております。

Location:
trunk/ab5.0/ablib/src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/ActiveBasic/Windows/Registry.ab

    r577 r585  
    4545    Function Name( ) As String
    4646        Dim name As String
    47         If IsNothing(This.subkeyname) Then
     47        If ActiveBasic.IsNothing(This.subkeyname) Then
    4848            name = This.rootkeyname
    4949        Else
     
    7676    '新しいサブキーを作成するか、または既存のサブキーを開きます。 
    7777    Function CreateSubKey( subkey As String ) As RegistryKey
    78         If IsNothing(subkey) Then Return Nothing
     78        If ActiveBasic.IsNothing(subkey) Then Return Nothing
    7979        Dim buf = subkey
    8080        '末尾の\を除去
     
    108108    '指定したサブキーを削除します。文字列 subkey では、大文字と小文字は区別されません。 
    109109    Sub DeleteSubKey ( subkey As String )
    110         If IsNothing( subkey ) Then Exit Sub
     110        If ActiveBasic.IsNothing( subkey ) Then Exit Sub
    111111        This.DeleteSubKey( subkey, True )
    112112    End Sub
    113113    Sub DeleteSubKey ( subkey As String, throwOnMissingSubKey As Boolean )
    114         If IsNothing( subkey ) Then Exit Sub
     114        If ActiveBasic.IsNothing( subkey ) Then Exit Sub
    115115        Dim key = This.OpenSubKey(subkey)
    116116        If key.SubKeyCount <> 0 Then
     
    128128    'サブキーとその子サブキーを再帰的に削除します。文字列 subkey では、大文字と小文字は区別されません。 
    129129    Sub DeleteSubKeyTree ( subkey As String )
    130         If IsNothing( subkey ) Then Exit Sub
     130        If ActiveBasic.IsNothing( subkey ) Then Exit Sub
    131131        Dim key = This.OpenSubKey( subkey )
    132132        If key.SubKeyCount <> 0 Then
     
    142142    '指定した値をこのキーから削除します。 
    143143    Sub DeleteValue ( name As String )
    144         If IsNothing( name ) Then Exit Sub
     144        If ActiveBasic.IsNothing( name ) Then Exit Sub
    145145        This.DeleteValue( name, True )
    146146    End Sub
    147147    Sub DeleteValue ( name As String, throwOnMissingValue As Boolean )
    148         If IsNothing( name ) Then Exit Sub
     148        If ActiveBasic.IsNothing( name ) Then Exit Sub
    149149        RegDeleteValue( This.handle, ToTCStr(name) )
    150150        This.edited = True
     
    203203                Return New System.String( pbData As LPCTSTR )
    204204            Case REG_MULTI_SZ
    205                 Return New System.String( pbData As LPCTSTR )
     205                Dim list As System.Collections.Generic.List<String>
     206                Dim s As System.String
     207                Do
     208                    s = New System.String(pbData As *TCHAR)
     209                    If s.Length = 0 Then Exit Do
     210                    list.Add(s)
     211                    pbData += (s.Length + SizeOf(TCHAR))
     212                Loop
     213                Return list
    206214            Case REG_QWORD
    207215                Dim qw As QWord
     
    221229    '指定した名前に関連付けられた値のレジストリ データ型を取得します。 
    222230    Function GetValueKind ( name As String ) As RegistryValueKind
    223         If IsNothing( name ) Then Exit Sub
     231        If ActiveBasic.IsNothing( name ) Then Exit Sub
    224232        Dim dwType As DWord
    225233        If ERROR_SUCCESS <> RegQueryValueEx( This.handle, ToTCStr(name), 0, VarPtr(dwType), NULL, NULL ) Then
     
    262270    '指定したサブキーを取得します。 
    263271    Function OpenSubKey ( name As String ) As RegistryKey
    264         If IsNothing(name) Then Return Nothing
     272        If ActiveBasic.IsNothing(name) Then Return Nothing
    265273        Dim buf = name
    266274        '末尾の\を除去
     
    338346
    339347    Sub SubKey( subkey As String )
    340         If IsNothing(subkey) Then Exit Sub
     348        If ActiveBasic.IsNothing(subkey) Then Exit Sub
    341349        This.subkeyname = subkey
    342350    End Sub
  • trunk/ab5.0/ablib/src/api_mmsys.sbp

    r341 r585  
    15101510Declare Function joyGetNumDevs Lib "winmm" () As DWord
    15111511#ifdef UNICODE
    1512 Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsW" (uJoyID As DWord, pjc As *JOYCAPSW, cbjc As DWord) As MMRESULT
    1513 #else
    1514 Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, pjc As *JOYCAPS, cbjc As DWord) As MMRESULT
    1515 #endif
    1516 Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, pji As *JOYINFO) As MMRESULT
    1517 Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, pji As *JOYINFOEX) As MMRESULT
    1518 Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, puThreshold As *DWord) As MMRESULT
     1512Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsW" (uJoyID As DWord, ByRef pjc As JOYCAPSW, cbjc As DWord) As MMRESULT
     1513#else
     1514Declare Function joyGetDevCaps Lib "winmm" Alias "joyGetDevCapsA" (uJoyID As DWord, ByRef pjc As JOYCAPSA, cbjc As DWord) As MMRESULT
     1515#endif
     1516Declare Function joyGetPos Lib "winmm" (uJoyID As DWord, ByRef pji As JOYINFO) As MMRESULT
     1517Declare Function joyGetPosEx Lib "winmm" (uJoyID As DWord, ByRef pji As JOYINFOEX) As MMRESULT
     1518Declare Function joyGetThreshold Lib "winmm" (uJoyID As DWord, ByRef puThreshold As DWord) As MMRESULT
    15191519Declare Function joyReleaseCapture Lib "winmm" (uJoyID As DWord) As MMRESULT
    15201520Declare Function joySetCapture Lib "winmm" (hwnd As HWND, uJoyID As DWord, uPeriod As DWord, fChanged As BOOL) As MMRESULT
     
    20022002TypeDef LPMCI_GENERIC_PARMS = *MCI_GENERIC_PARMS
    20032003
    2004 Type MCI_OPEN_PARMS
     2004Type MCI_OPEN_PARMSA
    20052005    dwCallback As DWord
    20062006    wDeviceID As DWord
     
    20092009    lpstrAlias As LPSTR
    20102010End Type
    2011 TypeDef PMCI_OPEN_PARMS = *MCI_OPEN_PARMS
    2012 TypeDef LPMCI_OPEN_PARMS = *MCI_OPEN_PARMS
     2011TypeDef PMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
     2012TypeDef LPMCI_OPEN_PARMSA = *MCI_OPEN_PARMSA
     2013
     2014Type MCI_OPEN_PARMSW
     2015    dwCallback As DWord
     2016    wDeviceID As DWord
     2017    lpstrDeviceType As LPWSTR
     2018    lpstrElementName As LPWSTR
     2019    lpstrAlias As LPWSTR
     2020End Type
     2021TypeDef PMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
     2022TypeDef LPMCI_OPEN_PARMSW = *MCI_OPEN_PARMSW
     2023
     2024#ifdef UNICODE
     2025TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSW
     2026TypeDef PMCI_OPEN_PARMS = PMCI_OPEN_PARMSW
     2027TypeDef LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSW
     2028#else
     2029TypeDef MCI_OPEN_PARMS = MCI_OPEN_PARMSA
     2030TypeDef PMCI_OPEN_PARMS = PMCI_OPEN_PARMSA
     2031TypeDef LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSA
     2032#endif
    20132033
    20142034Type MCI_PLAY_PARMS
Note: See TracChangeset for help on using the changeset viewer.