Click here to Skip to main content
15,881,852 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionTrying to take ownership of a Directory but it fails... Pin
varunpandeyengg12-Apr-12 23:32
varunpandeyengg12-Apr-12 23:32 
Questionswprintf_s procedure not find in xp Pin
vishalgpt1-Apr-12 6:09
vishalgpt1-Apr-12 6:09 
AnswerRe: swprintf_s procedure not find in xp Pin
Richard MacCutchan1-Apr-12 22:25
mveRichard MacCutchan1-Apr-12 22:25 
Questionwindow hooks and control ID Pin
daemonna28-Mar-12 5:43
daemonna28-Mar-12 5:43 
AnswerRe: window hooks and control ID Pin
«_Superman_»28-Mar-12 21:58
professional«_Superman_»28-Mar-12 21:58 
GeneralRe: window hooks and control ID Pin
daemonna28-Mar-12 22:27
daemonna28-Mar-12 22:27 
Questionusage of KeyboardLayout function Pin
subhendu_m27-Mar-12 4:38
subhendu_m27-Mar-12 4:38 
QuestionIWebBrowser2: When submitting data via a form, the form appears again Pin
Pachner20-Mar-12 1:36
Pachner20-Mar-12 1:36 
Hi there,

I am using a CAxWindow to implement an IWebBrowser2 control on an ATL Dialog. What I want to do is to display a facebook like button on my dialog.
As this is done via an HTML link, I embed the Webbrowser control into my dialog:
CAxWindow ieWindow = GetDlgItem(IDC_BROWSER_CONTROL);

ieWindow.QueryControl( & m_WebBrowserPointer );

if (m_WebBrowserPointer)
{
    VARIANT v;
    VariantInit(&v);
    
    std::wstring link = L"http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com&send=false&layout=button_count&width=320&show_faces=false&action=like&colorscheme=light&font&height=21";
    
    HRESULT res = m_WebBrowserPointer->Navigate(CComBSTR(url.c_str()), &v, &v, &v, &v);
}


This works fine so far. The "like"-button appears in my dialog. The problem begins when I click on the button and am not logged in to facebook.
Then, a login dialog appears (a new IE window). When I enter my login data without checking "Keep me logged in", the browser window closes and another browser window with the same content as before appears and I must enter the login data again. This happens 4 times, then the box at "Keep me logged in" is checked automatically, and the login works and my "like"-button changes its look (greyed out).
The login also works properly if I check the mark by hand.

So the problem is: Why does the login dialog appear several times after I have logged in? When I open the link in a standard browser window, the first try works correctly.
Do I have to submit other parameters to the call of Navigate()?
I also tried Fiddler to determine differences between the HTTP requests, but I couldn't figure out the differences. There seems to be a .js-script which loads the page again.

Please tell me if you need any more information. Thanks for your help!

Regards,

Fabian
AnswerRe: IWebBrowser2: When submitting data via a form, the form appears again Pin
Pachner22-Mar-12 1:15
Pachner22-Mar-12 1:15 
QuestionRelease COM dll crash problem (Windows 7 64bit OS) Pin
MrKBA8-Mar-12 22:14
MrKBA8-Mar-12 22:14 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
barneyman9-Mar-12 0:36
barneyman9-Mar-12 0:36 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
MrKBA21-Mar-12 2:11
MrKBA21-Mar-12 2:11 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
Richard MacCutchan9-Mar-12 20:52
mveRichard MacCutchan9-Mar-12 20:52 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
MrKBA21-Mar-12 2:11
MrKBA21-Mar-12 2:11 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
barneyman21-Mar-12 2:34
barneyman21-Mar-12 2:34 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
MrKBA21-Mar-12 2:46
MrKBA21-Mar-12 2:46 
GeneralRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
barneyman21-Mar-12 12:25
barneyman21-Mar-12 12:25 
AnswerRe: Release COM dll crash problem (Windows 7 64bit OS) Pin
MrKBA21-Mar-12 2:10
MrKBA21-Mar-12 2:10 
QuestionHow do I detect when a print job starts? Pin
LetsMond2-Mar-12 1:11
LetsMond2-Mar-12 1:11 
AnswerRe: How do I detect when a print job starts? Pin
AminMhmdi7-Mar-12 20:27
professionalAminMhmdi7-Mar-12 20:27 
GeneralRe: How do I detect when a print job starts? Pin
LetsMond7-Mar-12 22:30
LetsMond7-Mar-12 22:30 
QuestionATL Sink in .NET process Pin
Vikram123428-Feb-12 15:50
Vikram123428-Feb-12 15:50 
AnswerRe: ATL Sink in .NET process Pin
barneyman29-Feb-12 16:01
barneyman29-Feb-12 16:01 
GeneralRe: ATL Sink in .NET process Pin
Vikram123429-Feb-12 16:10
Vikram123429-Feb-12 16:10 
GeneralRe: ATL Sink in .NET process Pin
barneyman29-Feb-12 16:17
barneyman29-Feb-12 16:17 

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.