Форум: "Основная";
Текущий архив: 2002.02.07;
Скачать: [xml.tar.bz2];
ВнизГде взять combobox c историей Найти похожие ветки
← →
nikkie (2002-01-25 09:17) [9]поток информации явно превышает мою способность ее переваривать :(
вчера совершенно случайно наткнулся на такой текст в своем загашнике. источник не помню - какая-то рассылка.
How do I add the autocomplete feature I"ve seen in IE text fields?
There is a little known function called SHAutoComplete that resides in
the shwlapi.dll. Calling this function with the handle of an edit field and
the appropriate flags enables the IE autocomplete feature.
One important thing to keep in mind is that this function works only after
you call the ole-related CoInitialize (or CoInitializeEx) function.
This task is accomplished by the initialization section of the ComObj unit.
Here is a sample unit that shows how to use such feature:
unit AutoCompleteUnit;
interface
uses Windows, StdCtrls, ComObj;
Const
SHACF_DEFAULT = $0;
SHACF_FILESYSTEM = $1;
SHACF_URLHISTORY = $2;
SHACF_URLMRU = $4;
SHACF_URLALL = (SHACF_URLHISTORY Or SHACF_URLMRU);
SHACF_AUTOSUGGEST_FORCE_ON = $10000000;
SHACF_AUTOSUGGEST_FORCE_OFF = $20000000;
SHACF_AUTOAPPEND_FORCE_ON = $40000000;
SHACF_AUTOAPPEND_FORCE_OFF = $80000000;
function AutoComplete(editField: TEdit; dwFlags: DWORD): Boolean;
implementation
function SHAutoComplete(hwndEdit: HWND; dwFlags: dWord): LongInt;
&nbsёТKХnbsp; stdcall; external "shlwapi.dll";
function AutoComplete(editField: TEdit; dwFlags: DWORD): Boolean;
begin
Result := (SHAutoComplete(editField.Handle, dwFlags) = 0);
end;
end.
Страницы: 1 вся ветка
Форум: "Основная";
Текущий архив: 2002.02.07;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.005 c