Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Window in TWebBrowser

Status
Not open for further replies.

GirishGupta

Programmer
May 28, 2001
30
GB
When someone clicks on a link for a new window in WebBrowser1 it opens Internet Explorer. I don't want this.

I noticed OnNewWindow:

void __fastcall TWindow::BrowserNewWindow2(TObject *Sender,
void *ppDisp_which_is_really_a_Ptr_to_LPDISPATCH,
void *Cancel_which_is_really_a_Ptr_to_TOLEBOOL)

How do i get it to work with this function I've written?

void __fastcall TMain::CreateMDIChild(WideString URL)
{
TWindow *Child;
Child = new TWindow(Application);
Child->Name = "Window_" + IntToStr(MDIChildCount + 1);
Child->Caption = URL;
Child->Browser->Navigate(BSTR(URL));
StatusBar->Panels->Items[0]->Text = "Loading " + URL + "...";
}

Basically I need the URL the user clicked on to open a new window:

CreateMDIChild("
Please help!...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top