Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Full Screen feature implementation as SHDocVw?
#1
Hello.
Internet Explorer F11 hotkey want to implement features such as full screen on SHDocVw.IWebBrowser2.
But "Full_Screen" button the source does not work.
Please. What is wrong?


Function Fullscreen_mode_btn
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD.getfile("$Cache$\preview.html")
int x(88) y(1029)
if(!ShowDialog("Fullscreen_mode_btn" &Fullscreen_mode_btn &controls 0 0 0 0 x y)) ret
;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 444 446 "보기"
;3 ActiveX 0x54030000 0x0 0 0 444 428 "SHDocVw.WebBrowser"
;6 Button 0x54032000 0x0 280 432 48 14 "Full_Screen"
;2 Button 0x54030000 0x0 396 432 48 14 "Close"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,SHDocVw.IWebBrowser2 we3
,we3._getcontrol(id(3 hDlg))
,we3.Silent=TRUE
,we3.Refresh
,;subclass web browser
,int hctrl=child("" "Internet Explorer_Server" id(3 hDlg)); if(!hctrl) out "Warning: Web browser control not initialized. Assign an url or ''about:blank'' to the control variable before ShowDialog."; ret

,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SETCURSOR

ret
;messages2
sel wParam
,case [6]
,err-
,we3._getcontrol(id(3 hDlg))
,sel wParam
,,case 6
,,we3.Visible=TRUE
,,we3.FullScreen=TRUE
,err+

,case IDOK
,case IDCANCEL
ret 1
#2
we3.FullScreen works only when we3 refers to Internet Explorer, not when to WebBrowser control.
Resize dialog etc, to make it full-screen.
#3
Function Fullscreen_mode_btn
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD="http://www.google.com"
if(!ShowDialog("Fullscreen_mode_btn" &Fullscreen_mode_btn &controls)) ret

;BEGIN DIALOG
;0 "" 0x90CC0AC8 0x0 0 0 444 446 "보기"
;3 ActiveX 0x54030000 0x0 0 0 444 428 "SHDocVw.WebBrowser"
;6 Button 0x54032000 0x0 280 432 78 14 "Full_Screen (F11)"
;2 Button 0x54030000 0x0 396 432 48 14 "Close"
;END DIALOG
;DIALOG EDITOR: "" 0x2040202 "" "" "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,;DT_SetAutoSizeControls hDlg "3s 6m 2m"
,DT_SetAccelerators hDlg "6 F11"

,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SETCURSOR

ret
;messages2
sel wParam
,case 6
,int-- t_fullScreen
,t_fullScreen^1
,int cAX=id(3 hDlg)
,if t_fullScreen
,,Zorder hDlg HWND_TOPMOST
,,SetWinStyle hDlg WS_BORDER|WS_THICKFRAME 2
,,SetWindowState hDlg SW_SHOWMAXIMIZED 1
,,SetWindowState cAX SW_SHOWMAXIMIZED 1
,else
,,Zorder hDlg HWND_NOTOPMOST
,,SetWinStyle hDlg WS_BORDER|WS_THICKFRAME 1
,,SetWindowState hDlg SW_SHOWNORMAL 1
,,SetWindowState cAX SW_SHOWNORMAL 1
,0; InvalidateRect child("" "Internet Explorer_Server" cAX) 0 0 ;;sometimes does not repaint without this
,
,case IDOK
,case IDCANCEL
ret 1
#4
Dear Gintaras.
Thank you very much.
Have a good day! Big Grin


Forum Jump:


Users browsing this thread: 2 Guest(s)