Solved

Opening URL to a new window?

Posted on 2000-05-09
11
250 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
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.

765 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