Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to define a single hotkey in a dialog box
#23
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
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CB0AC8 0x0 0 0 548 318 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 548 320 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

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

#sub DlgProc
function# hDlg message wParam lParam
int- t_mainDlg
sel message
,case WM_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")
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_CLOSE
,DT_Ok(hDlg)
ret
;messages2
sel wParam
,case IDOK
,ifk(Y)          ;; Enter
,,key Y           ;; Enter
,,ret 0
,case IDCANCEL
,ifk(Z)          ;; Esc
,,key Z
,,ret 0
ret 1


#sub we3_DocumentComplete
function IDispatch'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


Messages In This Thread
RE: How to define a single hotkey in a dialog box - by Kevin - 04-29-2018, 05:04 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)