Solved

Opening URL to a new window?

Posted on 2000-05-09
11
256 Views
Last Modified: 2013-11-20
Hi,
I have developed an app that is using CHtmlView class to display HTML docs in my dialogs. But the problem is that when I right click on a link and say "Open link in new window" it opens another instance of IE, which I don't want. Instead I want that my own new view should be generated. How can I do this.
Thanks in advance.
0
Comment
Question by:Moin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
11 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 2791817
Hi Moin,

I think (but do not know, cause I have no experience with this) you'll have to override you view's CHtmlView::OnNewWindow2() where you can create a new view and assign it to the passed LPDISPATCH pointer.

hope that helps,

ZOPPO
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2791818
See MSDN article ID: Q184876 for samples of this...
0
 

Author Comment

by:Moin
ID: 2795594
This question has a deletion request Pending
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Expert Comment

by:Zoppo
ID: 2795765
This question no longer is pending deletion
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2795766
Why do you want to delete this task?
0
 

Expert Comment

by:maharia
ID: 2798861
Hi Moin,
  If you want to open your link to new IE window  then you just pass string to this function... and check for complete path od iexplore.exe....

ShellExecute(NULL,"open","C:\\Program Files\\Internet Explorer\\iexplore.exe",yourUrlString,NULL,SW_SHOW);
 
try out this and let me know.....
0
 

Author Comment

by:Moin
ID: 2798883
Please read my question carefully. Infact what you have proposed is currently happening to me and I don't want to happen this to me. :)
Thanks anyway for your time.
0
 

Expert Comment

by:maharia
ID: 2798922
Dear Moin,
 I had same problem as you but i tried this.... and got success...
why don'y you try and then reject answere...

.....

ShellExecute(NULL,"open","C:\\Program Files\\Internet Explorer\\iexplore.exe",yourUrlString,NULL,SW_SHOW);
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2799170
Ehh, Moin,

what do you think about the comments I gave you? Did they help you? I think MSDN article Q184876 describes detailed exactly what you need...

ZOPPO
0
 

Author Comment

by:Moin
ID: 2803789
Mr. Zoppo, pls. post your comment as answer. Thanks
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 2803831
You're welcome...

have a nice day,

ZOPPO
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Define unique primary key 9 95
sum13 challenge 24 134
Line meaning 9 89
matchUp  challenge 9 124
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question