Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change URL
#1
What code should I use to change the URL of a dialog web browser object upon clicking a button, like after case 4 below?

Function ChangeURL_Dlg
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;Example of multipage dialog calling code:
;str controls = "3"
;str lb3
;lb3="&Page0[]Page1[]Page2"
;if(!ShowDialog("ThisFunction" &ThisFunction &controls)) ret
;...

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 265 163 "Dialog"
;1101 Static 0x44020000 0x4 106 4 48 13 "Page1"
;1201 Static 0x44020000 0x4 106 4 48 13 "Page2"
;3 ActiveX 0x54030000 0x0 6 6 256 128 "SHDocVw.WebBrowser"
;4 Button 0x54032000 0x0 214 142 48 14 "Next >"
;END DIALOG
;DIALOG EDITOR: "" 0x2030001 "" "0" ""

str controls = "3"
str ax3SHD = "http://www.google.com"
if(!ShowDialog("ChangeURL_Dlg" &ChangeURL_Dlg &controls)) ret

ret
;messages
sel message
,case WM_INITDIALOG
,goto selectpage
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4 ;;"Next >" - change to another URL

,
,case IDOK
,case IDCANCEL
,case LBN_SELCHANGE<<16|3
,;selectpage
,_i=LB_SelectedItem(id(3 hDlg))
,DT_Page hDlg _i
ret 1

Thanks!
#2
OK...found it (.navigate).
Sorry 'bout that chief!


Forum Jump:


Users browsing this thread: 1 Guest(s)