AutoComplete

Post Reply
User avatar
ssbbs
Posts: 54
Joined: Mon Oct 17, 2005 3:03 am

AutoComplete

Post by ssbbs »

Hello All!

Windows API have one function "SHAutoComplete" from "shlwapi.dll"
But I do try fail, somebody can help me ? I hope have like IE address URL autocomplete function.

Code: Select all

// harbour: AutoComplete( hWnd )
HRESULT (CALLBACK* lpSHAutoComplete)(HWND ,DWORD);
HB_FUNC( AUTOCOMPLETE )
{
    // LONG nRet;
    LONG nRet;
    HWND hWnd = (HWND) hb_parnl(1);  // Dialog hWnd
    HINSTANCE hIns = LoadLibrary("shlwapi.dll");
    if (hIns != NULL) {
       (FARPROC *) lpSHAutoComplete = GetProcAddress(hIns, "SHAutoComplete");
       if (lpSHAutoComplete != NULL) {
          nRet = lpSHAutoComplete( hWnd, 0);
          hb_retnl( nRet );
       }
       else
          hb_retnl(-2);
       FreeLibrary(hIns);
    }
    else
       hb_retnl(-1);
    return;
}

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

What return value do you get ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ssbbs
Posts: 54
Joined: Mon Oct 17, 2005 3:03 am

Post by ssbbs »

Antonio Linares wrote:What return value do you get ?
Zero(0), It's OK, no error,
But, EditBox or Combobox have not 'AutoComplete' function.
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post by Maurilio Viana »

User avatar
ssbbs
Posts: 54
Joined: Mon Oct 17, 2005 3:03 am

Post by ssbbs »

Maurilio Viana wrote:http://fivetechsoft.com/forums/viewtopi ... t=tautoget

Regards,
Maurilio
I know it, But that is not my request.
Post Reply