Solved

Opening My Own Workspace in VC++

Posted on 2003-10-29
6
292 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
  • 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now