Hi, here is my task. I need to create a program that will launch the user's default browser with a url that I specify. Is there any way to do it?
Compiler:Borland C++ 5.0
Hi, here is my task. I need to create a program that will launch the user's default browser with a url that I specify. Is there any way to do it?
Compiler:Borland C++ 5.0
Yup...
ShellExecute()...
this has been answered loads of times...a few times by myself....try a search for more info
Hello. I tried using ShellExecute. This is the line I inserted...
ShellExecute(handle,"open","c:\\Sundeep\\Directory \\Homepage.url",NULL,NULL,SW_SHOWMAXIMIZED);
after including shellapi.h
I am getting 26 errors, all to do with the file shellapi.h.
A few examples of ShellExecute() would be helpful. You must have guessed, I am trying to launch the user's default browser to open the file Homepage.url located in the directory I have specified.
Compiler:Borland C++ 5.0
Last edited by sundeeptuteja; 08-04-2002 at 02:15 AM.
What type of errors are you getting?
shellapi.h comes with msvc++.
First make sure you have the file on your computer. Use the windows search to do this.
Look at borlands help, or online site to find out what header to include.
I went to http://msdn.microsoft.com/ and searched for ShellExecute. This is what i found
http://msdn.microsoft.com/library/de...ellexecute.asp
if looks like you are using the function correctly, so it must be a compiler issue.
I thaught Borland C++ 5.0 was only for dos apps. Or do you have Builder? im not to up to date with my borland knowledge, i have been using msvc++ for the past 2 years. Can you create windows applications?
Maybe if you post your full source, or some of the error messages
Warn :shellapi.h(33,22):Style of function definition is now obsolete
Error:shellapi.h(33,23):{ expected
Error:shellapi.h(35,17):Declaration syntax error
Error:shellapi.h(36,17):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(35,17):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(36,17):Declaration syntax error
Error:shellapi.h(42,17):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(36,17):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(42,17):Declaration syntax error
Error:shellapi.h(43,17):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(42,17):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(43,17):Declaration syntax error
Error:shellapi.h(44,17):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(43,17):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(44,17):Declaration syntax error
Error:shellapi.h(46,22):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(44,22):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(46,22):Declaration syntax error
Error:shellapi.h(47,22):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(46,22):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(47,22):Declaration syntax error
Error:shellapi.h(53,22):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(47,22):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(53,22):Declaration syntax error
Error:shellapi.h(54,22):Multiple declaration for 'DECLSPEC_IMPORT'
Error:shellapi.h(53,22):Earlier declaration of 'DECLSPEC_IMPORT'
Error:shellapi.h(53,22):Too many error or warning messages
Here are the errors I am getting. The whole source file is attached, please check it out. The function definition to look for is void update(). Look at line no. 1006.
I tried searching the Borland help files, and found out that an import library has been specified, called shell32.lib, which does not seem to exist on my PC. I am assuming that the errors are caused because of this. Perhaps you could tell me where to get it, I could not find it on the Borland website. The file shellapi.h however does exist.
Also, as I am just a 12th grade student, I haven't learnt anything about creating windows applications yet. So far all the programs I have created are DOS applications. I do not user Builder.
Compiler:Borland C++ 5.0
Last edited by sundeeptuteja; 08-05-2002 at 03:19 AM.