CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2000
    Location
    Germany
    Posts
    122

    Double Click on desktop thru a C++ call

    I double click on the MyInternet icon and I am into the internet.
    I double click on the MyVPN icon and I am into my own virtual private network.
    And then with C++ code I can make a socket and glom onto a tcp/ip address and port.

    It all works fine.

    But I'd like to do my double clicking in C++ code.

    Can I write

    MyInternet.Start(); ?
    MyVPN.Start(); ?

    or does MS have something like

    AfxDblClickOn("MyInternet"); ?

    Is there an API function where I can reach these two items in my Win2000 system
    and start them, stop them, see if they're running?

  2. #2
    Join Date
    Nov 2003
    Posts
    1,902
    You can execute anything with a shell association using system().
    For example, calling system("mydoc.doc") will launch Word and load that document - as if you double-clicked it.

    Stopping "it" and checking if "it" is running takes a little more work.

    gg

  3. #3
    Join Date
    Apr 2000
    Location
    Germany
    Posts
    122
    Very Interesting !!!
    Looks easier than I expected.

    But one little thing : I want to do this on a Windows CE instead of a Win2000.

    The MyVPN is not really visible as an ABC.doc or DoMe.exe file.
    It's hidden inside the "\Windows\Control.exe" app which shows a window full of icons.
    Drilling down further is WCE magic.
    So MyInternet.exe and MyVPN.exe are not visible for a system("MyVPN.exe") type of command.

    Any idea of good sites for WCE codegurus?

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