04-28-2018, 01:18 PM (This post was last modified: 04-28-2018, 01:20 PM by win.)
I define a hotkey for the dialog, but it requires at least two keys, for example ctrl+F1, I want to use one hotkey(F1), I did not find the example in the help, I hope someone can remind me, thanks in advance
04-28-2018, 11:01 PM (This post was last modified: 04-28-2018, 11:02 PM by win.)
hi @kevin
Using the above code, I found a problem. In some places when I press Enter and confirm the operation, when I press the Enter key, it doesn't work. Do you know what the reason is? Can't use Enter key, not very convenient
04-29-2018, 01:20 AM (This post was last modified: 04-29-2018, 01:20 AM by Kevin.)
its not so simple. Need to figure out a way to know when file is loaded. Then can maybe send mouse message. Sorry cant help more im not at my pc. Will try later
sel message ,caseWM_INITDIALOG ,t_mainDlg=hDlg ,SHDocVw.WebBrowser we3 ,we3._getcontrol(id(3 hDlg)) ,we3.Navigate("http://static.focusky.com/web/demo/Eduction/Complexity Thoughts/index.html")
,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ,caseWM_CLOSE ,DT_Ok(hDlg) ret ;messages2 sel wParam ,caseIDOK ,ifk(Y);; Enter ,,key Y ;; Enter ,,ret0 ,caseIDCANCEL ,ifk(Z);; Esc ,,key Z ,,ret0 ret1
How to hide the right scroll bar? I did not find the style options
04-29-2018, 05:04 PM (This post was last modified: 04-29-2018, 05:50 PM by Kevin.)
Oh i see your loading different file. No wonder it doesn't work. The flash or html page which ever it is bigger than the dialog control that's why the scroll bar.
on my pc there is no scroll bar .It auto sizes to fit dialog control on my pc. must be a win7 issue or browser control is running in compatibility mode again.
this also works for me loading the quiz.swf file directly
Function Dialog_Quiz
#sub DlgProc function# hDlg message wParam lParam int- t_mainDlg sel message ,caseWM_INITDIALOG ,t_mainDlg=hDlg ,DT_SetAutoSizeControls(hDlg "3s") ,SHDocVw.WebBrowser we3 ,we3._getcontrol(id(3 hDlg)) ,str s.expandpath("$Desktop$\quiz.swf") ,we3.Navigate(s) ,we3._setevents("sub.we3") ,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ,caseWM_CLOSE ,DT_Ok(hDlg) ret ;messages2 sel wParam ,caseIDOK ,ifk(Y);; Enter ,,key Y ;; Enter ,,ret0 ,caseIDCANCEL ,ifk(Z);; Esc ,,key Z ,,ret0 ret1
#sub we3_DocumentComplete functionIDispatch'pDisp `&URL ;;SHDocVw.IWebBrowser2'we3 int- t_mainDlg int w=win("Dialog""#32770") ;just outputting 2 variables for testing they are both dialog window handle and should be the same out w out t_mainDlg ;either of the above two vars should work as they are the same Htm e=htm("EMBED""""" w "0")
e.SetFocus
int- t_mainDlg int w=win("Dialog""#32770") ;just outputting 2 variables for testing they are both dialog window handle and should be the same out w out t_mainDlg ;either of the above two vars should work as they are the same
I did not find t_mainDlg in the QM help. In addition, I found that many times you will need the prefix (t_) variable. Where are these variables found?
In a few days, I will try again after upgrading the operating system to windows 10. Thank you very much for your help.
04-29-2018, 09:53 PM (This post was last modified: 04-29-2018, 10:03 PM by Kevin.)
A variable can have any name i only put them there to check that both were getting the same window handle . The name can be anything, could be int dialoghandle, int window handle etc etc ect qm uses w w1 w2 w3 ect for window handles and hDlg for dialogs. qm does have some predefined variables but other than that can make it any name u wish. The general rule is to make the variable name clear as to what it does so later you can easily identify what it does