Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert html code into QM code and run function in JS code of the html
#5
below i have shown how to have a button for full screen and also how to load with and without the iframe
don't really need the iframe at all
the javascript was never going to work 

Function Fullscreen
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x0 0 0 374 232 "Dialog"
;4 Button 0x54032000 0x0 0 0 80 14 "Full screen (F11)"
;3 ActiveX  0x54030000 0x0 0 0 374 232 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "3"
str ax3SHD="http://fs.focusky.com.cn/jhgh/glyv/index.html";;;without iframe
;to use iframe uncomment line below and comment line above and  find we3.Refresh line(line 40 and uncomment)
;str ax3SHD=
;<html>
;;;;<head>
;;;;;;;;<title>test</title>
;;;;;;;;<style type="text/css" media="screen">
;;;;;;;;;;;;html, body  { height:100%;width:100% }
;;;;;;;;;;;;body { margin:0; padding:0; overflow:hidden; text-align:center;
;;;;;;;;;;;;;;;;;;;background-color: #ffffff; }
;;;;;;;;</style>
;;;;</head>
;;;;<body>
;;;;;;;;<iframe style="width:100%;height:100%" src="http://fs.focusky.com.cn/jhgh/glyv/index.html" seamless="seamless" scrolling="no" frameborder="0" allowtransparency="true" allowfullscreen="true" ></iframe>
;;;;</body>
;</html>
WebBrowserControlDisableIE7Emulation

if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,SHDocVw.WebBrowser we3
,we3._getcontrol(id(3 hDlg))
,DT_SetAutoSizeControls hDlg "3s"
,DT_SetAccelerators hDlg "4 F11"
,;we3.Refresh;;; uncomment  if using iframe but dont really need iframe
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4
,int-- t_full; t_full=!t_full
,int cWC=id(3 hDlg)
,int fsb= id(4 hDlg)
,sub.FullScreen hDlg t_full cWC fsb    
ret 1
#sub FullScreen
function w full cwc fullscreenButton
str text
if full
,,SetWinStyle w WS_BORDER|WS_THICKFRAME 2
,,SetWindowState w SW_SHOWMAXIMIZED 1
,,text="Exit Full Screen (F11)"
,,;SetWindowState cwc SW_SHOWMAXIMIZED 1
,,InvalidateRect child("" "Internet Explorer_Server" cwc) 0 0 
else
,,SetWinStyle w WS_BORDER|WS_THICKFRAME 1
,,SetWindowState w SW_SHOWNORMAL 1
,,text="Full screen (F11)"
,,;SetWindowState cwc SW_SHOWNORMAL 1
,,InvalidateRect child("" "Internet Explorer_Server" cwc) 0 0 
text.setwintext(fullscreenButton)


Messages In This Thread
RE: How to insert html code into QM code and run function in JS code of the html - by Kevin - 05-19-2018, 01:13 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)