Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change web browser in dialog
#1
How can i change the image displaying in a web browser window of a dialog. eg: this has 1 picture in when i click it then it goes to the next.
Function Function8
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str ax3SHD=
;<html>
;<style> BODY { margin: 2px 0px 0px 1px; overflow: auto; } </style>
;<body><a href="" target="_blank"><img src=""0" alt=""></a></body>
;</html>

str Function8Layout=
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ActiveX 0x54030000 0x0 80 18 45 56 "SHDocVw.WebBrowser"
;4 Button 0x54032000 0x0 144 34 50 30 "Next"
;5 Button 0x54032000 0x0 14 34 50 30 "Last"
;END DIALOG
;DIALOG EDITOR: "" 0x2030006 "" "" ""
if(!ShowDialog(Function8Layout &Function8 &controls)) ret
ret
;messages
if(message=WM_INITDIALOG) DT_Init(hDlg lParam)
sel message
,case WM_INITDIALOG
,ret 1
,case WM_DESTROY DT_DeleteData(hDlg)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,;messages3
,case IDCANCEL
,case 4
,;; change image
,case 5
,;; previous image
,case 1
,end
,case 2
,end
ret 1
#2
Function Function82
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

ARRAY(str)- t_ai
int- t_i
GetFilesInFolder t_ai "$user profile$\Pictures\Screensaver" "*.jpg"

_s=
;<html>
;<style> BODY { margin: 2px 0px 0px 1px; overflow: auto; } </style>
;<body><a href="" target="_blank"><img src="%s" alt=""></a></body>
;</html>

str controls = "3"
str ax3SHD
ax3SHD.format(_s iif(t_ai.len t_ai[0] ""))

str Function8Layout=
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 643 455 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 644 422 "SHDocVw.WebBrowser"
;4 Button 0x54032000 0x0 298 424 50 30 "Next"
;END DIALOG
;DIALOG EDITOR: "" 0x203000B "" "" ""
if(!ShowDialog(Function8Layout &Function82 &controls)) ret
ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 4
,t_i+1; if(t_i>=t_ai.len) ret
,Htm el=htm("IMG" "" "" hDlg 0 0 0x20)
,el.el.setAttribute("src" t_ai[t_i] 1)
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)