Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set Details view in file Open/Save dialogs
#1
Do you know a way to force the OpenSave dialog to "details" view throughout XP? From what I've read, it's not possible, but thought if anyone knew...

If there is no global XP solution, is it at least possible that when OpenSave is called within a qm macro, you could program the view change to details?

Thanks, as always!
#2
Function FileOpenDialogChangeView
Code:
Copy      Help
;/
function hwnd $view ;;view: "d" details, "h" thumbnails, "l" list, "n" icons, "s" tiles, "g" large icons (Win2000), "m" small icons (Win2000)

;Changes view in standard file "Open" or "Save" dialog.
;Error if failed.

;hwnd - dialog window handle.
;view - string consisting of the underlined character in the view menu.

;REMARKS
;Works only on Windows XP, 2000, 2003. On other OS does nothing.
;May not work on non-English Windows, because uses toolbar button text.
;Activates the window.

;EXAMPLE
;int w=win("Open" "#32770")
;FileOpenDialogChangeView w "d" ;;set detals view


if(_winnt>=6) ret
if(!hwnd) end "invalid window handle"

spe -1
act hwnd

Acc a=acc("View Menu" "PUSHBUTTON" hwnd "ToolbarWindow32" "" 0x1001)
;a.DoDefaultAction ;;does not work
;a.Mouse(1); mou ;;works, but...
int x y h=child(a)
a.Location(x y); ScreenToClient h +&x
int m=MakeInt(x y)
PostMessage h WM_LBUTTONDOWN 0 m
PostMessage h WM_LBUTTONUP 0 m

int w=wait(5 WV "+#32768")
key (view)

err+ end "failed"
#3
Thanks, man.

Can you show me how to incorporate in a macro, for instance with (or instead of?) this line:

Code:
Copy      Help
if(OpenSaveDialog(0 _s "All Files[]*.*[]MP3 Files[]*.mp3[]WAV Files[]*.wav[]" "" dir_queue)) _s.setwintext(cd.hctrl)

Everything I've tried returns "invalid window handle" error.
#4
Call FileOpenDialogChangeView from other thread.
For example, before OpenSaveDialog run a function using mac.
Let the function wait for the dialog and call FileOpenDialogChangeView.

int h=wait(30 WA win("Open" ...))
FileOpenDialogChangeView h "d"
#5
Cheers, mate!


Forum Jump:


Users browsing this thread: 1 Guest(s)