|
- Otwieranie strony internetowej w domyślnej przeglądarce.
Użyjesz funkcji ShellExecute. Zarówno Internet Explorer, jak i Netscape kojarzą siebie z rozszerzeniem .htm (.html). ShellExecute może otworzyć plik używając domyślnego programu. Oto jak to zrobić:
// dołącz SHLOBJ.H
#include <shlobj.h>
// otwiera plik HTML z dysku
ShellExecute(Handle,
"open",
"d:\\website\\index.htm",
NULL,NULL,SW_SHOWDEFAULT);
// otwiera stronę bezpośrednio
ShellExecute(Handle,
"open",
"http://cbuilder.rubikon.pl/index.html",
NULL,NULL,SW_SHOWDEFAULT);
// otwiera stronę bez znajomości nazwy pliku html
ShellExecute(Handle,
"open",
"http://cbuilder.rubikon.pl/",
NULL,NULL,SW_SHOWDEFAULT);
|