Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vista: filedialog fixer script
i work on a filedialog script that will resize and rearrange old style dialogs.

after some research i found this article: ... dialog.asp

in the moment my script works so far, that old filedialogs are resizeable.
i use aicon for testing:

Copy      Help
;int hwnd=win("Open source file(s)" "#32770")
def ANCHORE_LEFT    0x0000
def ANCHORE_TOP        0x0000
def ANCHORE_RIGHT    0x0001
def ANCHORE_BOTTOM  0x0002
def RESIZE_HOR      0x0004
def RESIZE_VER      0x0008
int hwnd=val(_command)
int hlv=child("FolderView" "SysListView32" hwnd 0x1)
int st = GetWinStyle(hwnd)
if(st=WS_THICKFRAME) goto something

SetWinStyle hwnd WS_THICKFRAME 1
int sys_menu=GetSystemMenu(hwnd 0)
AppendMenu(sys_menu MF_BYPOSITION|MF_STRING SC_SIZE "&Size")
int x y cx cy; GetWinXY hlv x y cx cy

out "huhu"

now i need to resize the folderview SysListView32 and move all other controls under it.
at this point i am lost in the moment.

related questions:

dreamweaver always starts with 'small icon view',
so i send
Copy      Help
int hlv=child("FolderView" "SysListView32" win("Open" "#32770") 0x1)
SetWinStyle hlv LVS_REPORT 1|8

the view is changing but i can't resize the colums (column headers are still fixed).
what do i miss ?
Get dialog client rectangle with GetClientRect, calculate where must be controls and move them with mov.

If you need to track when dialog is resized, you can use small toolbar attached to the right-bottom corner. Use hook function that moves controls on WM_MOVE.


Try to set list view extended style. For it is used SendMessage. Don't remember message name, something like LVM_SETEXTENDEDSTYLE, look in MSDN. Also don't remember what style it is, if it is.

Forum Jump:

Users browsing this thread: 1 Guest(s)