Click here to Skip to main content
15,917,061 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: why SYSTEMTIME doesn't return Hour?? Pin
nintendoWii7-May-08 14:49
nintendoWii7-May-08 14:49 
GeneralRe: why SYSTEMTIME doesn't return Hour?? Pin
Naveen7-May-08 14:54
Naveen7-May-08 14:54 
GeneralRe: why SYSTEMTIME doesn't return Hour?? Pin
Christopher Duncan7-May-08 19:10
Christopher Duncan7-May-08 19:10 
QuestionRe: why SYSTEMTIME doesn't return Hour?? Pin
David Crow8-May-08 4:34
David Crow8-May-08 4:34 
QuestionIWebBrowser2->Navigate and IE7 tabs Pin
Christopher Duncan7-May-08 14:14
Christopher Duncan7-May-08 14:14 
AnswerRe: IWebBrowser2->Navigate and IE7 tabs Pin
Rajkumar R7-May-08 20:08
Rajkumar R7-May-08 20:08 
GeneralRe: IWebBrowser2->Navigate and IE7 tabs Pin
Christopher Duncan8-May-08 5:30
Christopher Duncan8-May-08 5:30 
AnswerRe: IWebBrowser2->Navigate and IE7 tabs [modified] Pin
Rajkumar R8-May-08 6:08
Rajkumar R8-May-08 6:08 
Hi,

m_pBrowser->get_LocationURL(&bstrUrl); return the url the Webbrowser control is currently displaying, BeforeNavigate is the stage at which no url is Completed its Navigation or displayed (I think it updated after Navigate complete or Document complete). And that is the reason you got "about:Tabs." when you expected "practicalusa.com" since "about:Tabs." is the previous navigated url.


you need to check the parameter of the event, (second parameter url of BeforeNavigate2)

void DWebBrowserEvents2::BeforeNavigate2(
IDispatch *pDisp,
VARIANT *&url,
VARIANT *&Flags,
VARIANT *&TargetFrameName,
VARIANT *&PostData,
VARIANT *&Headers,
VARIANT_BOOL *&Cancel
);

I checked it in MFC classes, that get_LocationURL() returns empty string as you said.
the number of time event fired is inconsistent depends upon the number of redirects.

modified on Friday, May 9, 2008 12:55 AM

GeneralRe: IWebBrowser2->Navigate and IE7 tabs Pin
Christopher Duncan8-May-08 7:24
Christopher Duncan8-May-08 7:24 
Questionhow can I programmatically enable "File & Printer sharing for Microsoft Networks" ? Pin
oncer7-May-08 12:08
oncer7-May-08 12:08 
QuestionStrings in Studio 2005 v. Studio 6.0 Pin
john john mackey7-May-08 9:19
john john mackey7-May-08 9:19 
AnswerRe: Strings in Studio 2005 v. Studio 6.0 Pin
Mark Salsbery7-May-08 9:56
Mark Salsbery7-May-08 9:56 
GeneralRe: Strings in Studio 2005 v. Studio 6.0 Pin
john john mackey7-May-08 10:19
john john mackey7-May-08 10:19 
QuestionApp which would work on every Windows system Pin
Lutosław7-May-08 7:42
Lutosław7-May-08 7:42 
AnswerRe: App which would work on every Windows system Pin
CPallini7-May-08 8:14
mveCPallini7-May-08 8:14 
AnswerRe: App which would work on every Windows system Pin
David Crow7-May-08 8:21
David Crow7-May-08 8:21 
QuestionOverriding the maximize button for the main window in a MDI application Pin
berger_the_great7-May-08 5:00
berger_the_great7-May-08 5:00 
AnswerRe: Overriding the maximize button for the main window in a MDI application Pin
Randor 7-May-08 6:00
professional Randor 7-May-08 6:00 
GeneralRe: Overriding the maximize button for the main window in a MDI application Pin
berger_the_great9-May-08 5:16
berger_the_great9-May-08 5:16 
QuestionHow to Get a TCHAR into a CString? Pin
Larry Mills Sr7-May-08 4:48
Larry Mills Sr7-May-08 4:48 
AnswerRe: How to Get a TCHAR into a CString? Pin
toxcct7-May-08 4:54
toxcct7-May-08 4:54 
AnswerRe: How to Get a TCHAR into a CString? Pin
CPallini7-May-08 5:06
mveCPallini7-May-08 5:06 
QuestionRe: How to Get a TCHAR into a CString? Pin
David Crow7-May-08 5:26
David Crow7-May-08 5:26 
AnswerRe: How to Get a TCHAR into a CString? Pin
Randor 7-May-08 5:41
professional Randor 7-May-08 5:41 
AnswerRe: How to Get a TCHAR into a CString? Pin
Mark Salsbery7-May-08 6:52
Mark Salsbery7-May-08 6:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.