ShellExecute: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
This is a short tutorial on how to launch external applications in the client's default handler. For example, this can launch a website or a word document in the client's default viewer.
This gives insight on '''ShellExecute''' usage. For example, ShellExecute can launch a website or a word document in the client's default viewer.


<code>vgui\ISystem.h</code> must be included in the appropriate file.
<code>vgui\ISystem.h</code> must be included in the appropriate file.
Line 17: Line 17:
<code>file</code> points to the local file or webpage you want to access.
<code>file</code> points to the local file or webpage you want to access.


[[Category:Programming]][[Category:Interfaces]]
[[Category:Programming]]
[[Category:ISystem]]

Revision as of 19:26, 28 June 2006

This gives insight on ShellExecute usage. For example, ShellExecute can launch a website or a word document in the client's default viewer.

vgui\ISystem.h must be included in the appropriate file.

void ISystem::ShellExecute(const char *command, const char *file);
vgui::system()->ShellExecute(...);

command can have one of the following values:

  • "open"
  • "print"
  • "explore"
  • "play"
  • "properties"
  • NULL

Look here for more information on each of the commands.

file points to the local file or webpage you want to access.