home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 February
/
Chip_2002-02_cd1.bin
/
sharewar
/
apaths
/
APSOURCE.ZIP
/
WebSite.c
< prev
Wrap
C/C++ Source or Header
|
2001-03-26
|
1KB
|
44 lines
/* WebSite - March 26th, 2001
**
** Copyright (c) 1997-2001 by Gregory Braun. All rights reserved.
**
** This functions launches the user's Web Browser and goes
** directly to the Software Design Web Site on the Internet.
**
** Called: w = window handle to the parent.
** website = the URL to be used.
**
** Returns: TRUE upon success, or FALSE if an error exists.
**
** Notes: This function works with the Microsoft Windows
** Internet Explorer only!
*/
#include "AppPaths.h"
#define NAVIGATOR "Netscape.exe"
#define WEBSITE_ERR "URL: %s\r\r" \
"Cannot launch the Microsoft Internet Explorer or\r" \
"Netscape Navigator web browser applications.\r\r" \
"Error Code: %u"
extern BOOL far WebSite (HWND w,LPCSTR website)
{
auto HANDLE h;
auto char message[MSTRING];
if ((h = ShellExecute (w,NULL,website,NULL,NULL,SW_SHOW)) > (HANDLE) 32)
return (TRUE);
if ((h = ShellExecute (w,NULL,NAVIGATOR,website,NULL,SW_SHOW)) > (HANDLE) 32)
return (TRUE);
wsprintf (message,WEBSITE_ERR,website,(UINT) h);
return (Message (w,NULL,message));
}
/* end of WebSite.c - written by Gregory Braun */