Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web2Image
#15
When the page is loaded, I want to intercept the entire page in the dialog. How do I handle it?



Macro Macro9
Code:
Copy      Help
\Dialog_Editor

str controls = "3"
str ax3SHD
ax3SHD="https://www.msn.com"
if(!ShowDialog("" &sub.DialogProcedure &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 600 280 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 600 282 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2040801 "*" "" "" ""

#sub DialogProcedure
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3._setevents("sub.we3")
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


#sub we3_DocumentComplete
function IDispatch'pDisp `&URL ;;SHDocVw.IWebBrowser2'we3
out "webComplete"


HtmlDoc d.SetOptions(2)
d.InitFromWeb("https://www.msn.com")

__MemBmp b.Create(1000 6000)

MSHTML.IHTMLElementRender r=+d.d.body
MSHTML._RemotableHandle* workaround=+b.dc ;;DrawToDC is declared incorrectly in the type library
r.DrawToDC(workaround)

str sFile.expandpath("$temp$\1.bmp")
SaveBitmap b.bm sFile

run sFile


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)