vbAccelerator - Contents of code file: mShAutoComplete.basAttribute VB_Name = "mShAutoComplete"
Option Explicit
Public Enum SHAutoCompleteFlags
SHACF_DEFAULT = &H0 ' // Currently
(SHACF_FILESYSTEM | SHACF_URLALL)
SHACF_FILESYSTEM = &H1 ' // This includes the File
System as well as the rest of the shell (Desktop\My Computer\Control Panel\)
SHACF_URLHISTORY = &H2 ' // URLs in the User's History
SHACF_URLMRU = &H4 ' // URLs in the User's
Recently Used list.
SHACF_USETAB = &H8 ' // Use the tab to move thru
the autocomplete possibilities instead of to the next dialog/window control.
SHACF_URLALL = (SHACF_URLHISTORY Or SHACF_URLMRU)
SHACF_FILESYS_ONLY = &H10 ' // This includes the File
System
'#if (_WIN32_IE >= = &H0600)
SHACF_FILESYS_DIRS = &H20 ' // Same as
SHACF_FILESYS_ONLY except it only includes directories, UNC servers, and
UNC server shares.
'#End If ' // (_WIN32_IE >= = &H0600)
SHACF_AUTOSUGGEST_FORCE_ON = &H10000000 ' // Ignore the registry
default and force the feature on.
SHACF_AUTOSUGGEST_FORCE_OFF = &H20000000 ' // Ignore the registry
default and force the feature off.
SHACF_AUTOAPPEND_FORCE_ON = &H40000000 ' // Ignore the registry
default and force the feature on. (Also know as AutoComplete)
SHACF_AUTOAPPEND_FORCE_OFF = &H80000000 ' // Ignore the registry
default and force the feature off. (Also know as AutoComplete)
End Enum
Private Declare Function SHAutoComplete Lib "shlwapi.dll" ( _
ByVal hwndEdit As Long, ByVal dwFlags As Long) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hwndParent As Long, ByVal hwndChildAfter As Long, ByVal lpszClass As
String, _
ByVal lpszWindow As String) As Long
Private Const S_OK = 0
Public Function AutoComplete( _
ByVal hwnd As Long, _
ByVal eFlags As SHAutoCompleteFlags _
)
Dim lR As Long
lR = SHAutoComplete(hwnd, eFlags)
AutoComplete = (lR <> S_OK)
End Function
Public Function GetComboBoxEdithWnd(ByVal hwnd As Long) As Long
GetComboBoxEdithWnd = FindWindowEx(hwnd, 0, "EDIT", vbNullString)
End Function
|
|