Posts: 121
Threads: 33
Joined: Jun 2007
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!
Posts: 12,147
Threads: 143
Joined: Dec 2002
Function
FileOpenDialogChangeView
;/
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"
Posts: 121
Threads: 33
Joined: Jun 2007
Thanks, man.
Can you show me how to incorporate in a macro, for instance with (or instead of?) this line:
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.
Posts: 12,147
Threads: 143
Joined: Dec 2002
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"
Posts: 121
Threads: 33
Joined: Jun 2007