Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Folder View in ActiveX WebBrowser in Dlg
#5
Function dlg_folder_view
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3 4 6"
str ax3SHD cb4 e6
ax3SHD="$personal$"
cb4="FVM_ICON[]FVM_SMALLICON[]FVM_LIST[]FVM_DETAILS[]FVM_THUMBNAIL[]FVM_TILE[]FVM_THUMBSTRIP"; if(_winver>=0x601) cb4+"[]FVM_CONTENT"
if(!ShowDialog("dlg_folder_view" &dlg_folder_view &controls)) ret
out e6

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 441 374 "Form"
;3 ActiveX 0x54000000 0x0 0 20 440 352 "SHDocVw.WebBrowser"
;4 ComboBox 0x54230243 0x0 2 4 96 213 ""
;5 Button 0x54032000 0x0 116 2 64 14 "Open selected"
;6 Edit 0x44000080 0x200 236 2 96 14 ""
;7 Button 0x54032000 0x0 182 2 48 14 "Up"
;1 Button 0x54030001 0x0 338 2 48 14 "OK"
;2 Button 0x54030000 0x0 388 2 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040100 "" "" "" ""

ret
;messages
SHDocVw.WebBrowser we3
Shell32.ShellFolderView fv
Shell32.FolderItem fi
sel message
,case WM_INITDIALOG
,we3._getcontrol(id(3 hDlg))
,fv=we3.Document
,;fv.FilterView("*.txt")
,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
we3._getcontrol(id(3 hDlg))
sel wParam
,case CBN_SELENDOK<<16|4
,_i=CB_SelectedItem(lParam)+1
,fv=we3.Document
,fv.CurrentViewMode=_i
,
,case 5 ;;open selected
,fv=we3.Document
,fi=fv.FocusedItem
,;out fi.Path
,if fi.IsFolder
,,we3.Navigate(fi.Path)
,else
,,fi.InvokeVerb
,
,case 7 ;;Up
,;we3.GoBack ;;error
,;we3.ExecWB ?
,_s=we3.LocationURL
,_s.getpath
,we3.Navigate(_s)
,
,case IDOK
,;get path of selected item
,fv=we3.Document
,fi=fv.FocusedItem
,str path=fi.Path
,;out path
,path.setwintext(id(6 hDlg))
,
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 13 Guest(s)