File Open Dialog box from CmnDlg32.dll? 
Author Message
 File Open Dialog box from CmnDlg32.dll?

I am trying to use the Open dialog box from the Common Dialog controls.  All
of the dialog boxes with the exception of the File Open and File Save boxes
work.  When I try to use the Open/Save boxes, the following error message
results:

    "The common dialog function failed during initialization.  This error
often occurs when insufficient memory is available."

If anyone has any ideas on this, I would appreciate hearing them.  Thanks in
advance!

The script that creates this error is as follows:

    var  cdl_No_ChgDir        = 0x00000008;  //     8
    ...
    var  cdl_Allow_Multi      = 0x00000200;  //   512

    var  dBox   = new ActiveXObject( 'MSComDlg.CommonDialog' );

    var  flag   = (cdl_Allow_Multi | cdl_No_ChgDir);
    var  dir    = 'd:\\Scripts';
    var  filter = '*.js';

    ...

    dBox.CancelError  = false;
    dBox.InitDir      = dir;
    dBox.Filter       = filter;
    dBox.Flags        = flag;
    dBox.FilterIndex  = 1;

    try
    {
        dBox.ShowOpen();
    } catch( e )
      {
        Display( 'ERROR: ShowOpen() \n\"' + e.description + '\".\n' );
      }

    ...



Mon, 04 Nov 2002 03:00:00 GMT  
 File Open Dialog box from CmnDlg32.dll?

howdy--

SaveOpen

T



Mon, 04 Nov 2002 03:00:00 GMT  
 File Open Dialog box from CmnDlg32.dll?
Add:

dBox.MaxFileSize  = 260;

--
Michael Harris
MVP Scripting

I am trying to use the Open dialog box from the Common Dialog controls.  All
of the dialog boxes with the exception of the File Open and File Save boxes
work.  When I try to use the Open/Save boxes, the following error message
results:

    "The common dialog function failed during initialization.  This error
often occurs when insufficient memory is available."

If anyone has any ideas on this, I would appreciate hearing them.  Thanks in
advance!

The script that creates this error is as follows:

    var  cdl_No_ChgDir        = 0x00000008;  //     8
    ...
    var  cdl_Allow_Multi      = 0x00000200;  //   512

    var  dBox   = new ActiveXObject( 'MSComDlg.CommonDialog' );

    var  flag   = (cdl_Allow_Multi | cdl_No_ChgDir);
    var  dir    = 'd:\\Scripts';
    var  filter = '*.js';

    ...

    dBox.CancelError  = false;
    dBox.InitDir      = dir;
    dBox.Filter       = filter;
    dBox.Flags        = flag;
    dBox.FilterIndex  = 1;

    try
    {
        dBox.ShowOpen();
    } catch( e )
      {
        Display( 'ERROR: ShowOpen() \n\"' + e.description + '\".\n' );
      }

    ...



Mon, 04 Nov 2002 03:00:00 GMT  
 File Open Dialog box from CmnDlg32.dll?
Thanks,  that worked nicely!


Quote:
> Add:

> dBox.MaxFileSize  = 260;

> --
> Michael Harris
> MVP Scripting




Quote:
> I am trying to use the Open dialog box from the Common Dialog controls.
All
> of the dialog boxes with the exception of the File Open and File Save
boxes
> work.  When I try to use the Open/Save boxes, the following error message
> results:

>     "The common dialog function failed during initialization.  This error
> often occurs when insufficient memory is available."

> If anyone has any ideas on this, I would appreciate hearing them.  Thanks
in
> advance!

> The script that creates this error is as follows:

>     var  cdl_No_ChgDir        = 0x00000008;  //     8
>     ...
>     var  cdl_Allow_Multi      = 0x00000200;  //   512

>     var  dBox   = new ActiveXObject( 'MSComDlg.CommonDialog' );

>     var  flag   = (cdl_Allow_Multi | cdl_No_ChgDir);
>     var  dir    = 'd:\\Scripts';
>     var  filter = '*.js';

>     ...

>     dBox.CancelError  = false;
>     dBox.InitDir      = dir;
>     dBox.Filter       = filter;
>     dBox.Flags        = flag;
>     dBox.FilterIndex  = 1;

>     try
>     {
>         dBox.ShowOpen();
>     } catch( e )
>       {
>         Display( 'ERROR: ShowOpen() \n\"' + e.description + '\".\n' );
>       }

>     ...



Tue, 05 Nov 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Open file dialog box and upload file

2. WSH and "Open File" dialog box

3. invoke the Open file dialog box in DHTML

4. invoke the Open file dialog box in DHTML

5. Open File Dialog Box

6. Sample Code to use File Open dialog box

7. File Open dialog box

8. Open Multiselect Open dialog box

9. opening a browse or file open dialog

10. How to open a GetFilename dialog box

11. Bypass Open/Download Dialog Box

12. open common dialog box

 

 
Powered by phpBB® Forum Software