04-23-2018, 11:41 AM
The following code can pop up the right-click menu, but when the flash control is displayed in full screen, the flash control menu will still pop up.
Macro dismenu
Macro dismenu
typelib ShockwaveFlashObjects {D27CDB6B-AE6D-11CF-96B8-444553540000} 1.0
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 544 266 "Dialog"
;3 ActiveX 0x54030000 0x0 8 8 256 216 "ShockwaveFlashObjects.ShockwaveFlash {D27CDB6E-AE6D-11CF-96B8-444553540000}"
;4 ActiveX 0x54030000 0x0 280 8 256 216 "SHDocVw.WebBrowser {8856F961-340A-11D0-A96B-00C04FD705A2}"
;1 Button 0x54030001 0x4 408 240 48 14 "OK"
;2 Button 0x54030000 0x4 476 240 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""
str controls = "4"
str ax4SHD
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,ShockwaveFlashObjects.ShockwaveFlash sh3
,sh3._getcontrol(id(3 hDlg))
,sh3.LoadMovie(0 _s.expandpath("$desktop$\test.swf"))
,SetWindowSubclass(child("" "MacromediaFlashPlayerActiveX" id(3 hDlg)) &sub.WndProc_Subclass 1 0)
,SetTimer hDlg 1 100 0
,SHDocVw.WebBrowser we4
,we4._getcontrol(id(4 hDlg))
,we4.Navigate("http://static.flipbuilder.com/demo/sysco-seafood/index.html#p=1")
,
,case WM_TIMER
,sel wParam
,,case 1
,,int wies=child("" "Internet Explorer_Server" id(4 hDlg)); if(wies=0) ret
,,SetWindowSubclass(wies &sub.WndProc_Subclass 2 0)
,,KillTimer hDlg wParam
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#sub WndProc_Subclass
function# hwnd message wParam lParam uIdSubclass dwRefData
;OutWinMsg message wParam lParam ;;uncomment to see received messages
sel message
,case WM_RBUTTONDOWN
,str s=
,;1 Text
,;-
,;2 Text
,;>Submenu
,;,Text
,;,Text
,;,<
,MenuPopup x.AddItems(s)
,int i=x.Show
,ret
int R=DefSubclassProc(hwnd message wParam lParam)
sel message
,case WM_NCDESTROY
,RemoveWindowSubclass(hwnd &sub.WndProc_Subclass uIdSubclass)
,
,;case ...
ret R