Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
close the dialog with a web page
#16
Again the error is because  the variable  has no value 
Its  saying  close nothing  which qm or any program would red flag and say no i can't do that with clo function
Please take more time to read qm help it will better explain how things work
a variable needs specific things in order for it to do anything for example
you cant just say
i=4
or
url="www.google.com"
and then use it
first have to declare it
int i=4
str url="www.google.com"
and also need to understand what  the declarations mean
int is for numbers but only certain types of numbers
str can be many things
http://www.quickmacros.com/help/Language...ABLES.html
read again  
help topics
http://www.quickmacros.com/help/
in category Variables, constants, numbers, strings
this information is also built into QM itself under help

since your trying to close the child dialog need to first set the child dialogs window handle value to a variable in his case variable t_hdlg and pass that id to the child dialogs close sub function to the close the child window


Code:
Copy      Help
#sub DlgProc2
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,we3._setevents("sub.we3")
,int- t_hdlg=hDlg
,DT_SetAccelerators hDlg "403 F3[]404 F4"
,DT_SetAutoSizeControls hDlg "3s"
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_CLOSE
,DT_Ok(hDlg)
ret
;messages2
sel wParam
,case IDOK
,ifk(Y)
,,key Y           ;; Enter
,,ret 0
,case IDCANCEL
,ret 0
,case 403
,mes "F3"
,case 404
,mes "F4"
ret 1


#sub we3_WindowClosing
function @IsChildWindow @&Cancel ;;SHDocVw.IWebBrowser2'we3

Cancel=1
int- t_hdlg
clo t_hdlg
 then only the child dialog will close


Messages In This Thread
close the dialog with a web page - by win - 04-30-2018, 02:26 PM
RE: close the dialog with a web page - by win - 04-30-2018, 03:39 PM
RE: close the dialog with a web page - by win - 04-30-2018, 04:41 PM
RE: close the dialog with a web page - by Kevin - 04-30-2018, 07:46 PM
RE: close the dialog with a web page - by win - 04-30-2018, 10:21 PM
RE: close the dialog with a web page - by Kevin - 04-30-2018, 10:30 PM
RE: close the dialog with a web page - by win - 04-30-2018, 10:41 PM
RE: close the dialog with a web page - by Kevin - 04-30-2018, 10:45 PM
RE: close the dialog with a web page - by win - 04-30-2018, 10:47 PM
RE: close the dialog with a web page - by Kevin - 04-30-2018, 11:33 PM
RE: close the dialog with a web page - by win - 04-30-2018, 11:52 PM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 12:12 AM
RE: close the dialog with a web page - by win - 05-01-2018, 12:18 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 12:33 AM
RE: close the dialog with a web page - by win - 05-01-2018, 01:12 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 01:15 AM
RE: close the dialog with a web page - by win - 05-01-2018, 01:31 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 02:11 AM
RE: close the dialog with a web page - by win - 05-01-2018, 02:19 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 03:22 AM
RE: close the dialog with a web page - by win - 05-01-2018, 03:26 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 03:39 AM
RE: close the dialog with a web page - by win - 05-01-2018, 03:53 AM
RE: close the dialog with a web page - by Kevin - 05-01-2018, 03:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)