Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Popup window open link
#13
The problem of the border, there is always a thin border under win7, so I have time to install windows10 and try again, thank you

In addition:

I commented out a few lines of the list dialog and now I can open the page directly from the modal window.

I do not understand the following code, there is no short code to achieve the same function? Huh

Macro bs
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 586 262 "bs"
;2 Button 0x54030000 0x4 376 236 48 14 "Cancel"
;1 Button 0x54030001 0x4 308 236 48 14 "OK"
;3 ActiveX 0x54030000 0x0 12 8 344 216 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;4 ActiveX 0x54030000 0x0 364 8 218 216 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040701 "*" "" "" ""

str controls = "3 4"
str ax3SHD ax4SHD
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam
SHDocVw.WebBrowser we3
int- t_mainDlg

sel message
,case WM_INITDIALOG
,t_mainDlg=hDlg
,DT_SetAutoSizeControls(hDlg "3s 4mh 4sv 1m 2m")
,max hDlg
,
,we3._getcontrol(id(3 hDlg))
,we3._setevents("sub.we3")
,we3.Navigate("http://www.quickmacros.com/help/QM_Help/IDH_OVERVIEW.html")
,;we3.Navigate("http://static.flipbuilder.com/demo/sysco-seafood/index.html")
,;we3.Navigate("http://fs.focusky.com.cn/thasm/jcwz/index.html?flash")

,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


#sub we3_NewWindow3
function IDispatch&ppDisp @&Cancel dwFlags BSTR'bstrUrlContext BSTR'bstrUrl SHDocVw.IWebBrowser2'we3

;out bstrUrl
;out bstrUrlContext

int- t_mainDlg
;sel ListDialog("1 Main control[]2 Another control[]3 New dialog[]4 Web Browser" "Where to open the link?" "" 2 t_mainDlg)
,;case 0
,;Cancel=1
,;
,;case 1
,;Cancel=1
,;we3.Navigate(bstrUrl)
,;
,;case 2
,;SHDocVw.WebBrowser we4._getcontrol(id(4 t_mainDlg))
,;ppDisp=we4
,;
,;case 3
,int hDlg2=sub.Dialog2(t_mainDlg)
,SHDocVw.WebBrowser d2_we3._getcontrol(id(3 hDlg2))
,ppDisp=d2_we3


#sub Dialog2
function# [hwndOwner]

str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 344 214 "Dialog2"
;3 ActiveX 0x54030000 0x0 0 0 344 214 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040701 "*" "" "" ""

str controls = "3"
str ax3SHD
ret ShowDialog(dd &sub.DlgProc2 &controls hwndOwner 1) ;;modeless dialog


#sub DlgProc2
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DT_SetAutoSizeControls hDlg "3s"
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Attached Files Image(s)
   


Messages In This Thread
Popup window open link - by win - 04-20-2018, 06:41 AM
RE: Popup window open link - by Gintaras - 04-20-2018, 08:41 AM
RE: Popup window open link - by win - 04-20-2018, 09:13 AM
RE: Popup window open link - by win - 04-20-2018, 11:36 AM
RE: Popup window open link - by Kevin - 04-20-2018, 04:28 PM
RE: Popup window open link - by win - 04-20-2018, 06:32 PM
RE: Popup window open link - by Kevin - 04-20-2018, 07:19 PM
RE: Popup window open link - by win - 04-20-2018, 08:25 PM
RE: Popup window open link - by win - 04-20-2018, 10:45 PM
RE: Popup window open link - by Kevin - 04-21-2018, 12:09 AM
RE: Popup window open link - by win - 04-21-2018, 03:13 AM
RE: Popup window open link - by Kevin - 04-21-2018, 03:18 AM
RE: Popup window open link - by win - 04-21-2018, 04:33 AM
RE: Popup window open link - by win - 04-21-2018, 05:59 AM
RE: Popup window open link - by Kevin - 04-21-2018, 11:46 PM
RE: Popup window open link - by win - 04-22-2018, 01:58 AM
RE: Popup window open link - by r0n - 04-22-2018, 04:33 PM
RE: Popup window open link - by Kevin - 04-22-2018, 05:39 PM
RE: Popup window open link - by win - 04-22-2018, 10:35 PM
RE: Popup window open link - by Kevin - 04-22-2018, 11:19 PM
RE: Popup window open link - by win - 04-22-2018, 11:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)