Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting info from hidden browser window
#2
htm works but searches in the visible control if you don't specify the hidden control.

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

str controls = "3 1001 1101"
str lb3 ax1001SHD ax1101SHD
lb3="&Page0[]Page1"
ax1001SHD="http://www.google.com"
ax1101SHD="http://www.quickmacros.com"
if(!ShowDialog("" &MultiPageTest22 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 265 163 "Dialog"
;3 ListBox 0x54230101 0x204 4 4 96 80 ""
;1001 ActiveX 0x54030000 0x0 108 4 154 128 "SHDocVw.WebBrowser"
;1101 ActiveX 0x54030000 0x0 108 4 154 128 "SHDocVw.WebBrowser"
;1 Button 0x54030001 0x4 142 146 48 14 "OK"
;2 Button 0x54030000 0x4 192 146 48 14 "Cancel"
;4 Button 0x54032000 0x4 242 146 18 14 "?"
;6 Button 0x54032000 0x0 4 90 96 26 "Get info from hidden browser control"
;5 Static 0x54000010 0x20004 0 138 800 1 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030502 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,goto selectpage
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,
,case LBN_SELCHANGE<<16|3
,;selectpage
,_i=LB_SelectedItem(id(3 hDlg))
,DT_Page hDlg _i
,
,case 6
,int w=hDlg ;;int w=wait(3 WV win("Dialog" "#32770"))
,w=id(1101 w) ;;get control that is parent of the hidden web browser control. Without this, htm would search in the visible.
,Htm e=htm("P" "" "" w "0" 5 0x20 3)
,str VersionInfo=e.Text
,out "VersionInfo = %s" VersionInfo
ret 1

Functions to change Z-order of controls:
BringWindowToTop (easiest)
SetWindowPos
Zorder (uses SetWindowPos)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)