Jump to content

autocomplete error


Recommended Posts

Ok well I've searched through the forum and I have not found a similar problem like this.

Func RC_Edit_Changed()
    _GUICtrlComboBox_AutoComplete($RC_mainUserListBox)
EndFunc;==>_Edit_Changed

Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg
    Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo
    If Not IsHWnd($RC_mainUserListBox) Then $hWndCombo = GUICtrlGetHandle($RC_mainUserListBox)
    $hWndFrom = $ilParam
    $iIDFrom = BitAND($iwParam, 0xFFFF); Low Word
    $iCode = BitShift($iwParam, 16); Hi Word
    debug("iCode = ",$iCode); this put out the same number on both operating systems
    Switch $hWndFrom
        Case $RC_mainUserListBox, $hWndCombo
            Switch $iCode               
                Case $CBN_EDITCHANGE; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box                 
                    RC_Edit_Changed()
                Case $CBN_KILLFOCUS; Sent when a combo box loses the keyboard focus                 
                    HotKeySet("{Enter}")                    
                    debug("at endfocus","true")
                Case $CBN_SETFOCUS; Sent when a combo box receives the keyboard focus
                    HotKeySet("{Enter}","RC_addPerson")
                    debug("at setfocus","true")
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc

I basically just used the helpfiles autocomplete example and modified it for my own purposes. (see above)

but whenever I run the program it acts differently depending on the operating system.

In windowsXP the auto complete works and has no problems, but

In windows2000 it does not work. I need something that will work in both operating systems or it is useless to me.

If anyone know why this is happening .. or some other way of doing it please let me know.

Thank you for any help on this matter.

Edited by Aiakonai

hmm... I wonder which key is the any key :O

Link to comment
Share on other sites

just saw something else that is odd about the autocomplete on the win2k machine.

whenever it first gains focus, after one entry the insertion cursor is placed at the beginning of the line.

after that it just allows you to continue typing, but if it the edit control loses function and then gains it again.

It will do the exact same thing and put your insertion cursor at the beginning of the line after hitting any key.

Has anyone heard of something like this happening before?

hmm... I wonder which key is the any key :O

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...