| View previous topic :: View next topic |
| Author |
Message |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Tue Feb 21, 2006 7:23 pm Post subject: ExtFileDlg w/Image Preview - Extension |
|
|
ExtDlg.DLL is a VDS implementation of Delphi's TOpenDialog, TSaveDialog, TOpenPictureDialog and TSavePictureDialog functions. Basically it's an extended version of VDS's "@FileDlg" function.
Extended Features include:
1. Thumbnail image preview pane on the file browser dialog
2. Full-size/resizable image preview window
3. Hide or show the "Places Bar"
4. Set initial browser directory
5. Set initial browser file filter index
6. Set default return extension (save type dialogs)
This package includes three separate builds of the extension all have the same functionality but support different graphic file formats:
ExtDlg.dll Supports 6 formats:
(*.bmp; *.emf; *.ico; *.jpeg; *.jpg; *.wmf)
ExtDlg8.dll Supports 8 formats:
(*.bmp; *.emf; *.gif; *.ico; *.jpeg; *.jpg; *.png; *.wmf)
ExtDlg40.dll Supports 40 formats:
(*.bmp; *.bw; *.cel; *.cut; *.dib; *.emf; *.eps; *.fax; *.gif; *.icb; *.ico; *.jfif; *.jpe; *.jpeg; *.jpg; *.pbm; *.pcc; *.pcd; *.pcx; *.pdd; *.pgm; *.pic; *.png; *.ppm; *.psd; *.psp; *.rgb; *.rgba ;*.rla; *.rle; *.rpf; *.scr; *.sgi; *.tga; *.tif; *.tiff; *.vda; *.vst ;*.win; *.wmf)
I've also included the Delphi source code incase you would like to customize or adapt the extension's functions for another use. This code is part of a larger graphics extension I've been working on between paying projects. The next release will include an image element and several image editing, filtering and conversion routines.
New Version 1.1 R2
Changes:
1. Resolved non-existent file issue with Open Dialogs
2. Added "Overwrite Existing File" prompt to Save Dialogs
Download Link:
http://www.twpro.com/pub/ExtDlg2.zip
| Description: |
|
| Filesize: |
131.76 KB |
| Viewed: |
2059 Time(s) |

|
Last edited by WidgetCoder on Thu Mar 09, 2006 10:17 pm; edited 2 times in total |
|
| Back to top |
|
 |
bbelcher Contributor

Joined: 30 Jul 2002 Posts: 172
|
Posted: Tue Feb 21, 2006 7:53 pm Post subject: |
|
|
| That is way to cool. I cant wait for the image edit part.. excellent work.
|
|
| Back to top |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Tue Feb 21, 2006 9:50 pm Post subject: |
|
|
Thank you.. It should be out around the time VDS 6 is released Just kidding..
|
|
| Back to top |
|
 |
trapper Contributor


Joined: 28 Jan 2005 Posts: 112 Location: Brisbane, Australia
|
Posted: Tue Feb 21, 2006 10:47 pm Post subject: |
|
|
| WidgetCoder wrote: | | Thank you.. It should be out around the time VDS 6 is released | Oh well... will just have to install it on the retirement centre PC.
_________________ John Trappett |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Mar 05, 2006 5:58 pm Post subject: |
|
|
Nice work
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Tue Mar 07, 2006 4:53 am Post subject: |
|
|
Is it possible to return the extension of the selected image or file from the combo box? I.e. If the user selects JPG images (*.jfif;*.jpe;*.jpeg;*.jpg) from the combo box in the save dialog and only types the file name, that we could tell that .jpg was selected and apply that to the file name. Know what I mean?
Thx
_________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Thu Mar 09, 2006 5:31 pm Post subject: |
|
|
Chris, Good Catch ! I hadn't considered that. We could grab what's in the combo but the problem is if it's a group of file extensions which one do we use? The class this is derived from does however offer an option property to reject the filename if the file doesn't exist and display a warning message to the user. I could easily add this option to all of the "open" style dialogs. What are your thoughts?
| Quote: |
ofFileMustExist Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).
|
|
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Mar 09, 2006 7:04 pm Post subject: |
|
|
I would suggest to use the most common file type. like JPG images (*.jfif;*.jpe;*.jpeg;*.jpg) you would use JPG and for Truevision images (*.icb;*.tga;*.vda;*.vst;*.win) use TGA. I think that would work. For the other formats, we can just inform the user to specify the extnsion otherwise the default would be used...or, make an option to let us choose what we want the default for that group to be...something like
OPTION EXTDLG, <image/file group>,<default extension>
so it would look like
OPTION EXTDLG,Truevision,TGA
_________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Thu Mar 09, 2006 7:27 pm Post subject: |
|
|
I thought about doing that exact thing but then realized using an open dialog if the actual file is some.tiff you would get some.tif instead. I think I've worked my way past that problem now with the version I'm on. I also forgot to include "Overwrite existing file" asks for the save style dialogs. I should have an updated version to post today.
Thank you for showing me the error of my ways
Last edited by WidgetCoder on Thu Mar 09, 2006 10:18 pm; edited 1 time in total |
|
| Back to top |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Thu Mar 09, 2006 9:00 pm Post subject: Updated ExtDlg.dll version |
|
|
New Version 1.1 R2
Changes:
1. Resolved non-existent file issue with Open Dialogs
2. Added "Overwrite Existing File" prompt to Save Dialogs
Download:
http://www.twpro.com/pub/ExtDlg2.zip
Thanks again for your help Chris
Bill
|
|
| Back to top |
|
 |
henrywood Contributor

Joined: 21 Sep 2004 Posts: 66 Location: Copenhagen, Denmark
|
Posted: Fri Mar 10, 2006 10:48 am Post subject: User defined Preview ?? |
|
|
Hi !
I just had a thought. Let's say that I wanted to add a preview of MPEG and AVI files through a VDS user command.
I imagine it would go something like this:
| Code: |
#define command,EXTDLGPREVIEW
# Register the name of the user command to call
OPTION EXTDLG,CMDNAME,EXTDLGPREVIEW
# Register file types that EXTDLGPREVIEW will be used for
OPTION EXTDLG,FTYPES,avi|mpg|mpeg
# Register the class name of the VDS-based preview dialog (so that EXTDLG will close it (if it exists) before calling the EXTDLGPREVIEW command)
OPTION EXTDLG,WINDOW,#EXTDLGPRV
# Show the EXTDLG dialog
%F = @extdlg(....)
...
stop
# EXTDLG should send the file is first parameter
:EXTDLGPREVIEW
%E = @ext(%1)
if @equal(%E,avi)
# Create a dialog for the preview
DIALOG CREATE,Movie Preview,100,100,100,100,,CLASS EXTDLGPRV
dialog add,...
dialog show
elsif @equal(%E,mpeg)@equal(%E,mpg)
DIALOG CREATE,Movie Preview,100,100,100,100,,CLASS EXTDLGPRV
dialog add,...
dialog show
end
# The exit statement should return the control to the DLL
exit
|
Would this be possible in a future version ? Or maybe it may be achieved in some other manner ?
Henrik
[/code:1:c0eef0aef2]
|
|
| Back to top |
|
 |
WidgetCoder Contributor


Joined: 28 May 2002 Posts: 126 Location: CO, USA
|
Posted: Fri Mar 10, 2006 8:19 pm Post subject: Re: User defined Preview ?? |
|
|
| henrywood wrote: | Hi !
I just had a thought. Let's say that I wanted to add a preview of MPEG and AVI files through a VDS user command.
|
I'm a bit confused on what you're looking for here. A thumbnail representation for movie types similar to explorer's thumbnail view or actually running the file in a media control on the OpenDialog? Also keep in mind that it's a modal dialog so your script will halt any further execution until the dialog has been closed.
BTW: could you place a carriage return in you previous post? I'm having to use the horizonal scroll bar to read the full page.
|
|
| Back to top |
|
 |
|