MFC to open IE

Hello,

What is the best programmatic way to open a URL explicitly using IE 
(assuming IE is installed on a machine, but not assuming as a default 
browser)?

Thanks,
Janiv Ratson. 


0
janiv (189)
1/2/2006 10:29:39 AM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
641 Views

Similar Articles

[PageSpeed] 11

It would appear that the easiest way to do it is to just run (via 
ShellExecute, CreateProcess or whatever function you choose) the following 
commandline:
iexplore http://www.abc.com/def/

Internet Explorer (at least as it is installed in my windows XP SP2 
machine) will take a URL as a parameter and when passed a URL with no other 
parameters, it opens that URL in a window (in my case, a new IE window will 
be opened but that might depend on settings somewhere)

0
jonwil (9)
1/2/2006 11:49:16 AM
Hi,

simplest way to open any url in default browser:

ShellExecute(NULL, _T("open"), url, NULL,NULL, showcmd);

if you want to open url with IE when IE isn't default browser you should 
launch iexplore.exe from <Program Files>\Internet Explorer and pass url as a 
parameter in ShellExecute.


"Janiv Ratson" wrote:

> Hello,
> 
> What is the best programmatic way to open a URL explicitly using IE 
> (assuming IE is installed on a machine, but not assuming as a default 
> browser)?
> 
> Thanks,
> Janiv Ratson. 
> 
> 
> 
0
Mila (2)
1/2/2006 3:24:03 PM
Use ShellExecute. It will open the *default browser*, whatever that happens
to be(IE or firefox etc).

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"Janiv Ratson" <janiv@aoe6.net> wrote in message
news:OFJ0Qe4DGHA.524@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> What is the best programmatic way to open a URL explicitly using IE
> (assuming IE is installed on a machine, but not assuming as a default
> browser)?
>
> Thanks,
> Janiv Ratson.
>
>


0
ajaykalra (6842)
1/2/2006 4:03:20 PM
http://www.codeproject.com/shell/AutomateShellWindow.asp

"Janiv Ratson" <janiv@aoe6.net> д���ʼ�
news:OFJ0Qe4DGHA.524@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> What is the best programmatic way to open a URL explicitly using IE
> (assuming IE is installed on a machine, but not assuming as a default
> browser)?
>
> Thanks,
> Janiv Ratson.
>
>


0
sheng_jiang (305)
1/2/2006 6:55:25 PM
Hello and thanks,
On the contrary, I need to open IE specifically(even if firefox is the 
default brpwser), because these are MCE html files.
Thanks,
Janiv Ratson.


"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message 
news:eWqIFX7DGHA.1288@TK2MSFTNGP09.phx.gbl...
> Use ShellExecute. It will open the *default browser*, whatever that 
> happens
> to be(IE or firefox etc).
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
>
>
> "Janiv Ratson" <janiv@aoe6.net> wrote in message
> news:OFJ0Qe4DGHA.524@TK2MSFTNGP09.phx.gbl...
>> Hello,
>>
>> What is the best programmatic way to open a URL explicitly using IE
>> (assuming IE is installed on a machine, but not assuming as a default
>> browser)?
>>
>> Thanks,
>> Janiv Ratson.
>>
>>
>
> 


0
janiv (189)
1/8/2006 1:48:45 PM
"Janiv Ratson" <janiv@aoe6.net> wrote in message 
news:OFJ0Qe4DGHA.524@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> What is the best programmatic way to open a URL explicitly using IE 
> (assuming IE is installed on a machine, but not assuming as a default 
> browser)?
>

Launch "iexplore.exe" using ShellExecute and specify the url on the 
command-line.

-- David


0
dc2983 (3206)
1/8/2006 8:38:46 PM
Reply:

Similar Artilces:

Clicking .XLS files opens Excel, but not the file
My mother in law has a new pc running xp home & Excel 2003 (11.5612.5606). When she double clicks a .XLS file in WE, it opens the program, but not the file. When in the program if she selects file/open then the same file, it opens fine. This is the case for all her .XLS files. Any idea how to enable the double click option? TIA Dan Sometimes one of these works: Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel (both instances) and Windows Start Button|Run excel /unregserver then Windows Start Button|Run excel /regserver The /unregserver &...

file corruptions on open of a viso dwg.
When I open a viso drawing...I get an error 5392 Corrupt file. What can I do to fix?? I just upgraded from the technical refresh to the new trial version. I was working on the file for a few hours...saved it. When I tried to open the same file the next morning . It gave me this error Jerry Since you are using 2007, you could try opening in a machine with 2003. They use the same file format. The file may just be corrupt, and there's nothing that can be done other than to recreate from scratch, unless you have a backup of the file. Also, you can try everything in the KB article...

Outlook 2000 does not open
Am running Office 2000 on ME. Did not add or delete anything recently. Was working fine. Try to open Outlook and the applet comes up and stays. I can open the task master and it does not show Outlook is not responding. I can also end task Outlook. I have verified that Express opens. I have tried to re-install using the program disks repair function without success. I have also tried to restore to an earlier point. Can anyone offer help? Am I left to completely uninstall office200 and re-instal Close Outlook. Find and rename outcmd.dat to .old. (If using Windows 2000 or XP, you will ne...

Switching between open workbooks
Is there a keystroke combination for switching between open workbooks? Many thanks. After serious thinking Frank Kirk wrote : > Is there a keystroke combination for switching between open workbooks? > Many thanks. Ctrl+Tab -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc On Mon, 09 May 2011 12:38:27 -0400, Frank Kirk wrote: > > Is there a keystroke combination for switching between open workbooks? > Many thanks. Indeed there is: Ctrl-F6. It works in AT LEAST Excel 2003, 2007, and 2010. ...

outlook freezes every time i open
every time i open the application, it freezes...it may be stuck on a message, but i cant delete it until it opens without crashing...i get the "not responding" header at the top if i try to click anywhere. suggestions? thanks casey ...

I need a blank open hours sign
I need a blank bussiness open hours sign that I was able to get with Windows millinium and can not find with XP. Can you help me? ...

Dynamically Loading/Unloading extension DLLs (MFC)
I seem to have a problem unloading MFC extension DLL's with VC2002 (it may also exist on VC2002). The following code is the DLLMain for a DLL which is loaded/unloaded dynamically from a VC7 MFC application. =================================== #include "stdafx.h" #include <afxdllx.h> .... static AFX_EXTENSION_MODULE ETVFDDLL = { NULL, NULL }; extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { if (dwReason == DLL_PROCESS_ATTACH) { AfxInitExtensionModule(ETVFDDLL, hInstance); new CDynLinkLibrary(ETVFDDLL)...

Tracking Time a form is open
Yet another addition my manager has requested for our call log... The students that call donors are currently not tracked as to how long they talk to a donor over the phone. We would like to have some way of monitoring this - and I felt that the best way would be to record in minutes and seconds how long a record is opened on the form. This would not be something that would display on the form, but when the students print the end of day report showing thier work, it would show up on the report for each record. Any ideas?? -- R. Daniel Carlson Concordia University Office of Developmen...

Build of plain MFC DLL fails in VC7.1
I cannot get the MFC DLL code generated by the Visual Studio .Net 2003 wizard to compile/build successfully. I create a "new" project (Project Type: Visual C++ Projects->MFC, and template: MFC DLL), with DLL type="Regular DLL using sharded MFC DLL". Once the files are created, I try to "build solution" or " build projectName", and all I get is a message on the "Output" pane: Build log was saved at "file://e:\srs_mdl_cpp_v8_code\dllTest3\Debug\BuildLog.htm" dllTest3 - 1 error(s), 0 warning(s) ---------------------- Done -----------...

Microsoft Dynamics CRM Technical Consultant Job Opening in Chennai
Dear All, We are having Microsoft Dynamics CRM Job Opening in Chennai CRM Technical Consultant This individual will assist with defining application requirements, technical specifications, use-cases, workflow processes and effort estimation involving customization or integration of Microsoft CRM. Assist with providing internal and client support of Microsoft CRM installations. Obtain certifications in Microsoft CRM. Required Skills/Experience: =B7 Implementing and supporting Microsoft CRM; =B7 Integrating Microsoft CRM to Great Plains, Navision, JD Edwards...

Office took over email. Can't open 2nd-ary accts. What can I do?
Operating with MSN via DSL. Have multiple user names. Bought new laptop with Outlook 2003. Can access main user name email, but cannot figure out how to open my secondary email accounts, all on MSN. Was able to go directly to MSN Sign-in window before activating Outlook 2003. Now when I open Explorer, I get an Envelope that links to Outlook 2003 that opens only my main email address. Can anyone help me? ...

OPENING A DOCUMENT
HOW CAN I OPEN A DOCUMENT THAT WAS SAVED IN AN OLDER VERSION OF PUBLISHER WITH A NEWER VERSION OF PUBLISHER If you have 2002 or 03 you should be able to open the older Publisher publication. If you have Norton, disable "script blocking", and in Norton options, disable "Office Plug-ins". The latter may not have to be disabled. I you still cannot convert the file, send the document to me and specify what version Publisher you have and I will convert it for you. Remove "my" to reply... -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.msauer.mvps.org...

When I open Word documents there are extra characters
I am using Word 2003. Suddenly Word documents that I open have many extra characters (dots, paragraph character). See http://word.mvps.org/FAQs/Formatting/NonPrintChars.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Deborah" <Deborah@discussions.microsoft.com> wrote in message news:6A155944-50A2-4BE2-85D3-00185F6F1585@microsoft.com... >I am using Word 2003. Suddenly Word documents that I open have many extra > characters (dots, paragraph character). ...

Displaying *.jpg files when documents are opened
How do you get *.jpg files to automatically display when documents are opened. My neice uses Outlook and when I send her pictures she has to open each one individually. I use Outlook Express and they are automatically displayed. Thanks for your help! Leigh You can't do this in Outlook -- Roady [MVP] www.sparnaaij.net Microsoft Office and Microsoft Office related News Also Outlook FAQ, How To's, Downloads and more... Tips of the month: -Create your own fully customized Toolbar -Creating a Classic View in Outlook 2003 Subscribe to the newsletter to receive news and tips &...

Can't open data file OR restore backup file on 2003
After reinstalling XP, and then Money, I cannot get Money to open my data file. I have gone through the standard process repeatedly but my data never shows up. I tried the the method described in "Run the Standard File Repair utility", downloading http://support.microsoft.com/kb/902466 and running it, but it gives me an error message about a missing DLL file and wont' run. Any ideas? Describe "cannot get Money to open" -- how are you doing this? What's happening? Error messages? How did you reinstall Money after reinstalling XP? "gbrumbe...

MFC code integrated with normal C,C++ code.
Hello Are there any real issues involved when I integrate my C code with MFC code. I am integrating my C,C++ file in the MFC generated project workspace. e.g. I have my normal C,C++ files as Implement.cpp, cli.c In Implementer.cpp I hav class myclas .. static myclass *getOb() Assuming Project name gui I have my MFC files as gui.cpp, guiDlg.cpp , stdafx.cpp. When I use myclass::getOb() in my guiDlg.cpp I get an error error LNK2001: unresolved external symbol public: static class myclass* __cdecl myclass::getObA(void)"... Can anybody plz tell me why am I getting this error ? B...

IE 8 Deleting/Clearing Cache
Hello, I remember under IE 6 and 7, that when you cleared your Cache and deleted internet files that if you were logged onto a site that required a login and password like say ESPN, that if you deleted the the cache that when you went back to the site you had to log back in. now when I go to tools>internet options>under browsing history click on delete: I have checked the following: Preserve Favorites website data Temporary Internet files Cookies History Form data InPrivate Filtering data Should these all be checked, as I want the websites to keep track of my ...

Runtime error trying to open Money 2003
I get a runtime error when trying to open Money 2003. I downloaded Money 2004 and the same occurs. All other software on my system is working fine. I have done all the steps in the one fix in the MS Knowledge base article (Microsoft Knowledge Base Article - 305254). All to no avail. I have edited the registry, deleted the program and reloaded. Not sure what to do, but I may be a Quicken user if this doesn't get fixed. I attempted to use my .NET id to send for help from Microsoft but that requires a product ID and that is difficult to get if you cannot get into the program in the fir...

Open Sales and Purchases As of a Date
I need reports showing open sales orders and open purchase orders as of a date. Before I go down the road of creating them, does anybody know of any solutions available off the shelf? -- Charles Allen, MVP ...

Can visio 2003 open zip files?
I'm downloading some visio colllections from visiocafe.com . These collections all come as .zip files. Can Visio read these compressed files automatically? -- Stefan Lasiewski http://stefanco.com unfortunately not, al "Stefan Lasiewski" <StefanLasiewski@discussions.microsoft.com> wrote in message news:261B8AC4-8B9C-4678-ABB5-B6D2AD6BC7D9@microsoft.com... > I'm downloading some visio colllections from visiocafe.com . These > collections all come as .zip files. > > Can Visio read these compressed files automatically? > > -- > Stefan Lasiewski...

How to reset the default placement of newly opened mail
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: imap I'm new to Entourage and there are frustrating aspects thus far. My latest one is that all newly opened mail pops up over the toolbar that I must click to reply to that mail. Every time I go to reply, delete, etc. I must click on the top of the mail and move it down to a position below the toolbar so I can access the tools. <br><br>Is there a way to reset this default placement of an opened piece of mail? I've searched every tool and can't find a way to do this. Please help...this is so...

Cannot open include file: 'iphlpapi.h':
A pre made project(in MFC) is given to me When I tried to build that project it is giving following error Cannot open include file: 'iphlpapi.h': No such file or directory Please help > A pre made project(in MFC) is given to me > When I tried to build that project it is giving following error > Cannot open include file: 'iphlpapi.h': No such file or directory > I believe this is part of Platform SDK. You will need to install the SDK. On my machine I can see this file in PlatformSDK\Include directory. I can also this under SmartDevices\SDK... directory. --- A...

Whenever I try to launch Firefox, Internet Explorer 8 Opens First
Hi All, If I click the Firefox in the start menu or browse to it in Program Files (x86) in Windows Explorer, IE launches first, asks me to set it as default (no thanks, I clicked firefox for a reason!) and then launches Firefox. If I run firefox.exe from an administrator command prompt, it opens correctly. I previously had Live Essentials installed, so perhaps this is an issue with Choice Guard and not IE? I also tried reinstalling Firefox to no avail. Anyone have an idea how I can fix this rather annoying issue? I don't think it's a problem with Firefox itself......

Cannot open excel inside word document
I'm using a Word document with incerted Excel spreadsheet. I normaly copying data line by line from the original excel document into incerted excel file. Always at one point, when I try to double-click to re-open the incerted excel file, a message appears saying the the "file is corrupted and no longer available". Most of the files I work with are on a server, but similar thing happens with files stored on my local drive. Thanks. SF ...

MS open XML conveter open xls error
i received xls file , when i using ms office xp , 2003 open show cannot "This file is not in a recongnizable format ", i have install FileFormatConverters, but still cannot convert , i need download xls file to local Harddisk and open with " Microsoft open XML conveter" save as file after open file again promtpt up the box show converting..... I would to know any ttools direct open without open with .... beasue i need install on zeno pc skill user computer. ...