I have this combo box that is used to hold an array of URL's from a file (History.txt).
All goes well, and I have a hidden button set to default so that when enter is pressed on teh combobox the button is activated and grabs teh text from the combobox.
This does not work, it returns a NULL string for some reason.
I was under the impression if I wanted to pull an "ENTER" out of the combobox I would have to subclass it and that seems to be too much work for this little project.
Not to mention it's over kill, the hidden button works well...
But I can't get a return from it.
Ideas?
Thanks
as always! 
------------------
Scott
mailto:[email protected][email protected]</A>
MCSE, MCP+Internet
All goes well, and I have a hidden button set to default so that when enter is pressed on teh combobox the button is activated and grabs teh text from the combobox.
This does not work, it returns a NULL string for some reason.
I was under the impression if I wanted to pull an "ENTER" out of the combobox I would have to subclass it and that seems to be too much work for this little project.
Not to mention it's over kill, the hidden button works well...
But I can't get a return from it.
Ideas?
Thanks


Code:
I created it as follows: 'Array is now loaded Dialog New 0, g_szMine,0,0, 300,30, %WS_MINIMIZEBOX Or %WS_CAPTION Or %WS_SYSMENU Or %WS_EX_LEFT To hDlg Control Add ComboBox, hDlg, %IDCOMBOBOX, HistArray(), 5, 1, 290,120, %CBS_DROPDOWN Or %WS_TABSTOP Control Add Button, hDlg, %ID_HIDDEN,"&Launch",5,50,45,14,%BS_DEFAULT Dialog Send hDlg, %WM_SETICON, %ICON_BIG, hIcon Menu Attach hMenu, hDlg Dialog Show Modal hDlg Call DialogProc To g_Result ' ' Case %WM_COMMAND Select Case LoWrd(wParam) Case %IDM_CLEAR g_Result = MsgBox("Are you sure you wish to clear the history?", %MB_ICONINFORMATION Or %MB_YESNO, g_szMine) Control Disable hDlg, %IDM_CLEAR If IsTrue Exist(g_HistFile) Then Kill g_HistFile Erase HistArray() ReDim HistArray(1 To 1000) As String End If Case %ID_HIDDEN 'Launch ComboBox Get Text hDlg ,%IDCOMBOBOX To g_szDestURL MsgBox g_szDestURL If Len(g_szDestURL) Then Incr HistIndex g_Result = ShellExecute(ByVal %NULL, "open", g_szDestURL + Chr$(0), ByVal %NULL, ByVal %NULL,%SW_SHOWMAXIMIZED) Else MsgBox "You must enter a valid URL", %MB_ICONSTOP,g_szMine End If Case %IDCOMBOBOX If LoWrd(CbCtlMsg) = %CBN_SELENDOK Then ComboBox Get Text hDlg ,%IDCOMBOBOX To g_szDestURL Incr HistIndex ComboBox Select hDlg, %IDCOMBOBOX, HistIndex g_Result = ShellExecute(ByVal %NULL, "open", g_szDestURL + Chr$(0), ByVal %NULL, ByVal %NULL,%SW_SHOWMAXIMIZED) End If Function = 1 Exit Function
Scott
mailto:[email protected][email protected]</A>
MCSE, MCP+Internet
Comment