Solved

Opening My Own Workspace in VC++

Posted on 2003-10-29
6
301 Views
Last Modified: 2010-04-01
Hi,
    How can I implement same functionality of dsw(workspace) file in my program? I want that when
I click on a file with extension say ".abc" It should
open corresponding ".xyz" and ".pqr" file in the same
folder. Can i Do it using VC++?. Also if i can use VB
will it be simpler?
Any help appreciated.

-P10m
0
Comment
Question by:p10m
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 13

Expert Comment

by:SteH
ID: 9641739
Studio opens all project files mentioned in .dsw file. That can be achieved by just parsing the file .abc in your app for filenames and open those files. ABC must be a registered extension which opens with your app for that purpose.
0
 

Author Comment

by:p10m
ID: 9656455
Hi SteH,
    Can you elaborate your answer little more using syntax of VC++ 6.0 ?

First of all,
I am double clicking on file name with extension .abc in explorer. So how does my program get the name of the file and its path ? How to handle it  in my code?

Further,
How do I know which  other files are present in the same folder? Can I get list of files present in any folder using
any API?

-Thanks
p10m






0
 
LVL 13

Accepted Solution

by:
SteH earned 20 total points
ID: 9686120
I am not sure for a MFC app. Places to look for are in CWinApp::InitInstance () using
ParseCommandLine (CCommandLineInfo& cmdLine)
and looking at the command line info.

To search for files in a directory you can use the code found in
http://www.codeguru.com/forum/showthread.php?s=&threadid=231184
and just set the last parameter to false (not including subdirs).
0
 
LVL 13

Expert Comment

by:SteH
ID: 9786016
Any more help needed?
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546279
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: SteH {http:#9686120}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question