CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    URGENT -- ShellExecute() on cpp, h files



    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

  2. #2
    Join Date
    Mar 1999
    Location
    Fl, USA
    Posts
    23

    URGENT -- ShellExecute() on cpp, h files



    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

  3. #3
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: URGENT -- ShellExecute() on cpp, h files



    have you associated an executabe with the ".cpp" and ".h" extensions?


    Sally

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