261 posts in this topic

Melba23 2,575

New: When using checkboxes and only files are to be returned, only files will display checkboxes. However, if any item is prechecked all items will display checkboxes to indicate the full path - but as before checked folders will only be returned if the UDF has been instructed to do so (+ 16 added to the $iDisplay parameter).

I was fed up with using the native FileOpenDialog and FileSelectFolder which appeared anywhere on the screen in seemingly random sizes and often allowed users to select files from other than the path desired. So I decided to write my own version of an Explorer-type treeview and here it is: ChooseFileFolder.

What are the main advantages of this UDF over the normal dialogs?

Common format for both file and folder selection.

Ability to size and place the dialog where you want it rather than how Windows last left it.

Ability to select (and delete) multiple items - even from different folders or drives. You can also select both files and folders from the same tree

Ability to preselect items.

And there is also a function to allow you to use an existing treeview in your own GUI to display the folder tree - no need to have a dialog at all.

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

Melba23 2,575

That has nothing to do with the C: drive - it is a result of an existing treeview not being found.

I cannot reproduce it at the moment - which makes it a bit tricky to debug. When you first run Example 6 do you get a visible list control under a vertically moveable separator bar? Had you selected any other drive before your C: drive or was this the first one?

Aside from that, it must have taken an eternity to index the whole C: drive - I just did it once and nearly died of boredom.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

guinness 1,444

I selected another Drive and then the C:\ Drive and I didn't get the same error! I also repeated Example 6 with just selecting the C:\ Drive and still no problem. Very weird indeed why UEZ got this error.

Share this post

Link to post

Share on other sites

Melba23 2,575

It looks like the problem is in the GUIFrame UDF not this one, as you only have a problem when $fSingleSel = False. In that case, the UDF creates a treeview within a frame created by GUIFrame and this is obviously not happening.

Have you tried to run the GUIFrame UDF and its examples - if not could you please do do? I wonder if there is a problem with it on x64 systems - it uses many DllCalls so I would not be at all surprised.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

Melba23 2,575

Interesting. With some help from Yashied I thought the GUIFrame UDF was x64 compatible. - see here and the next few posts.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

Share this post

Link to post

Share on other sites

Melba23 2,575

Thanks for that. I have no other reports of the GUIFrames UDF not being x64 compatible after Yashied helped me fix it.

The size of drive has nothing to do with it - it is a simple case of the treeview not being created as a result of GUIFrames failing to create the frame! So as the error is most certainly coming from that UDF (and the fact that UEZ cannot run that UDF on x64) I am wondering what is different with UEZ's machine.

M23

Edit: Typnig.

Edited February 10, 2011 by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area

..and then change any occurrences of @ProgramFilesDir to $sProgFiles. This change is due to the fact that AutoIt installs in the x86 Program Files folder ('C:\Program Files (x86)") on 64-bit O/S's. In x86 mode, that's where it looks by default, but not in x64 mode. This will give your example the ability to run the same in both bit modes.

Share this post

Link to post

Share on other sites

Yashied 198

You can't. The "Code" member in NMHDR structure requires four bytes (UINT). At least it did not correctly. Just replace UINT to INT. BTW, exactly in this form, NMHDR structure is defined in StructureConstants.au3.

Share this post

Link to post

Share on other sites

Ascend4nt 118

BTW, exactly in this form, NMHDR structure is defined in StructureConstants.au3.

Yeah, that's an issue that has supposedly been fixed in 3.3.7.0, check out ticket # 1479 regarding WM_NOTIFY. For now I've manually edited my AutoIt Includes to fix that problem, since it seems unlikely we'll see a new version of AutoIt released any time soon.

Share this post

Link to post

Share on other sites

Melba23 2,575

I mentioned a tutorial on this x64 compatability problem to enlighten hobbyist coders like me the last time it came up - I suppose both of you are still not interested in writing one?

New UDF and example in the first post.

M23

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort---- Sort arrays on multiple columnsChooseFileFolder---- Single and multiple selections from specified path treeview listingDate_Time_Convert-- Easily convert date/time formats, including the language usedExtMsgBox--------- A highly customisable replacement for MsgBoxGUIExtender-------- Extend and retract multiple sections within a GUIGUIFrame---------- Subdivide GUIs into many adjustable framesGUIListViewEx------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx------ Check/clear parent and child checkboxes in a TreeViewMarquee----------- Scrolling tickertape GUIsNoFocusLines------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify------------- Small notifications on the edge of the displayScrollbars----------Automatically sized scrollbars with a single commandStringSize---------- Automatically size controls to fit textToast-------------- Small GUIs which pop out of the notification area