Solved

Opening URL to a new window?

Posted on 2000-05-09
11
260 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
Technology Partners: 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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
Tab names are off by one 5 54
sumDigits challenge 9 178
EvenOdd challenge 10 160
Detect file exist or not 3 215
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

734 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