Click to See Complete Forum and Search --> : URGENT -- ShellExecute() on cpp, h files


chris
March 30th, 1999, 03:10 PM
Hi,


I'm trying to use ShellExecute to open .c, .cpp, and .h files in Visual Studio.

I have a simple dialog in which I press a button, and it opens a .cpp or .h file.


The problem is, nothing happens! it works fine for other file types, but not these!

I'm running Visual Studio at the same time, and want to have another program

open up files in Visual Studio. Any ideas?


I'm using the below command:


HINSTANCE hinst = ShellExecute(NULL,"open","c:\\boot.h",NULL,NULL,SW_SHOW);


Thanks,


Chris

Chris
March 30th, 1999, 03:10 PM
Hi,


I'm trying to use ShellExecute to open .c, .cpp, and .h files in Visual Studio.

I have a simple dialog in which I press a button, and it opens a .cpp or .h file.


The problem is, nothing happens! it works fine for other file types, but not these!

I'm running Visual Studio at the same time, and want to have another program

open up files in Visual Studio. Any ideas?


I'm using the below command:


HINSTANCE hinst = ShellExecute(NULL,"open","c:\\boot.h",NULL,NULL,SW_SHOW);


Thanks,


Chris

sally
March 31st, 1999, 02:55 AM
have you associated an executabe with the ".cpp" and ".h" extensions?


Sally

Sally
March 31st, 1999, 02:55 AM
have you associated an executabe with the ".cpp" and ".h" extensions?


Sally