Solved

Opening My Own Workspace in VC++

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Create string splitting user defined function in C++ 23 337
Microsoft C++ code failing in executable that worked 9 123
Safe conversion? 4 76
C++ Code Issue 4 38
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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

749 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