CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    15

    change extension (*.*) in CommonDialog open & save

    change extension (*.*) in CommonDialog open & save?
    now I need many extension (*.htm , *.txt , *.js) in CommonDialog open & save .
    please tell to me urgently (answer is sourcecode)
    Thank you very much.


  2. #2
    Join Date
    Apr 1999
    Posts
    9

    Re: change extension (*.*) in CommonDialog open & save

    Hi,

    From your question i understand that you want to view files of various extension at a given point of time. I have written a sample code that allows you to view *.rm,*.ra and *.ram file simultaneously. The code is as follows:

    static char BASED_CODE szFilter[] = "Real Network (*.ra;*.rm;*.ram)|*.ra;*.rm;*.ram|";

    CFileDialog FilePath(TRUE,"*.ra","", OFN_PATHMUSTEXIST|OFN_EXPLORER|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT,szFilter);

    FilePath.DoModal();

    Hope this helps.




    Regards,
    Smriti Venkatesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured