Unit Dialogsel

*****************************************************************) (* Copyright 1997,1998, Merkes' Pages (Markus Stephany) *) (* Email: mirbir.st@t-online.de/mirbir.st@saargate.de *) (* Web-page: http://home.t-online.de/home/mirbir.st/ *) (* *) (* This program was written in Borland Delphi 3 (and should be *) (* fully compatible with Delphi 2 (I hope it !). *) (* *) (******************************************************************) { this is a part of the modified version of ZipSfx. initially, zipsfx has been written by : (******************************************************************) (* ZipSFX *) (* Copyright 1997, Carl Bunton *) (* Home of ZipTV compression components for Delphi *) (* Email: Twojags@cris.com *) (* Web-page: http://www.concentric.net/~twojags *) (******************************************************************) the first modifications came from Eric W. Engler englere@swcp.com he is the creator of the powerful freeware zip-vcl delzip for delphi 2? and 3. now i am trying to make the code a bit more sfx-creator- and sfx-user- friendly, and i must say, eric is a very hard beta-tester :).

Classes

Functions

executecmd - reads the special header (s.
getarg - execute the command-line read from the special header, if any

to draw a imagelist-image on a hdc
getdefaultparams - messagebox(0,pchar(sr2),pchar(sr1),0);
newdirProc - --------------------------------------------------------------------------*) (*--------------------------------------------------------------------------*) (* newdirProc --- Handle messages for add subdir dialog.
seldialogProc - --------------------------------------------------------------------------*) (* selDialogProc --- Handle messages for select dir dialog.

Types

Constants

cm_browse
cm_group
cm_lbshow
cm_runapp

Variables

allowdcl
allowsel
caption
commandline
defovm
hideovm
seldir
storedpath
usecap
usecl
usesp


Functions


procedure executecmd(int:integer);

reads the special header (s.b.), if any and sets some variables

get the short (8+3)-filename (it seems that shellexecute has some problems with lfn


function getarg(index:integer):string;

execute the command-line read from the special header, if any

to draw a imagelist-image on a hdc


procedure getdefaultparams;

messagebox(0,pchar(sr2),pchar(sr1),0);

FUNCTION newdirProc(dlgnew : hWnd; // the dialog-proc for create-subdirectory DlgMessage : UINT; DlgWParam : WPARAM; DlgLParam : LPARAM) : BOOL;

--------------------------------------------------------------------------*) (*--------------------------------------------------------------------------*) (* newdirProc --- Handle messages for add subdir dialog. *) (*--------------------------------------------------------------------------

FUNCTION seldialogProc(dlgsel : hWnd; // the dialog-proc for directory-selection DlgMessage : UINT; DlgWParam : WPARAM; DlgLParam : LPARAM) : BOOL;

--------------------------------------------------------------------------*) (* selDialogProc --- Handle messages for select dir dialog. *) (*--------------------------------------------------------------------------

Types


Constants

cm_browse = 775

if true, then there is such a caption

cm_group = 509

for the single-selection listbox that the user sees if he is not allowed to select what files to extract

cm_lbshow = 302

for the "run xxx after extraction"-checkbox

cm_runapp = 1007

the item-id for the "browse dir"-buutin in the main dialog

Variables

allowdcl : boolean

if true, the there is such a command line to execute after extraction

allowsel : boolean

if true, then the end-user can disable running the command ''

caption : pchar

the default overwrite-mode (overwrite, confirm or skip

commandline : pchar

if true, then there is a stored path rather than the current directory

defovm : integer

if true, then hide the radiobuttons to select whether to overwrite existing files or not

hideovm : boolean

if true, the end-user can choose what files to extract from the archive

seldir : pchar

splits the command line in application / parameters, if possible

storedpath : pchar

the selected directory for the select-dir-dialog (in / out

usecap : boolean

the definable caption for the main dialog

usecl : boolean

the command line read from the special header

usesp : boolean

the default-directory stored in the special header (out