diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:56:41 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:59:33 -0800 |
commit | d577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch) | |
tree | 590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /iup/src/win/iupwindows_help.c |
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'iup/src/win/iupwindows_help.c')
-rwxr-xr-x | iup/src/win/iupwindows_help.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/iup/src/win/iupwindows_help.c b/iup/src/win/iupwindows_help.c new file mode 100755 index 0000000..f3a06b6 --- /dev/null +++ b/iup/src/win/iupwindows_help.c @@ -0,0 +1,32 @@ +/** \file + * \brief Windows Driver IupHelp + * + * See Copyright Notice in "iup.h" + */ + +#include <stdlib.h> +#include <stdio.h> + +#include <windows.h> +#include <shellapi.h> + +#include "iup.h" + +int IupHelp(const char* url) +{ + int err = (int)ShellExecute(GetDesktopWindow(), "open", url, NULL, NULL, SW_SHOWNORMAL); + if (err <= 32) + { + switch (err) + { + case ERROR_FILE_NOT_FOUND: + case ERROR_PATH_NOT_FOUND: + return -2; /* File not found */ + break; + default: + return -1; /* Generic error */ + break; + } + } + return 1; +} |