Click here to Skip to main content
15,921,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about zip file and jar file, urgent Pin
Ambit6-Feb-03 1:43
Ambit6-Feb-03 1:43 
GeneralRe: about zip file and jar file, urgent Pin
Mike Nordell6-Feb-03 4:11
Mike Nordell6-Feb-03 4:11 
GeneralRe: about zip file and jar file, urgent Pin
includeh106-Feb-03 5:23
includeh106-Feb-03 5:23 
GeneralRe: about zip file and jar file, urgent Pin
Mike Nordell7-Feb-03 3:55
Mike Nordell7-Feb-03 3:55 
GeneralDefault CD Player??. Pin
Demian Panello6-Feb-03 0:11
Demian Panello6-Feb-03 0:11 
GeneralExecuting the container Pin
-Dy5-Feb-03 23:21
-Dy5-Feb-03 23:21 
GeneralHtmlView, multiframe Pin
jeremysay5-Feb-03 23:21
jeremysay5-Feb-03 23:21 
GeneralRe: HtmlView, multiframe Pin
HENDRIK R6-Feb-03 0:55
HENDRIK R6-Feb-03 0:55 
Well, it's only a try!Unsure | :~

Getting all URLs of your web page isn't very complicated - for every frame the function OnBeforeNavigate2 gets called, providing the URL.

But determination on gaining focus should be a more advanced task.
When your document is loaded, you can get a pointer to all frames of your window by IHtmlWindow's get_frames function. Then you should implement a connection sink and connect to all IHtmlElementEvents2. Then you could react on it's onfocus event.
Connecting to the events could be done in the following way:
void CMyClass::ConnectEvents(IHTMLElement* pElem)
{
    HRESULT hr;
    IConnectionPointContainer* pCPC = NULL;
    IConnectionPoint* pCP = NULL;
    DWORD dwCookie;

    // Check that this is a connectable object.
    hr = pElem->QueryInterface(IID_IConnectionPointContainer, (void**)&pCPC);

    if (SUCCEEDED(hr))
    {
        // Find the connection point.
        hr = pCPC->FindConnectionPoint(DIID_HTMLElementEvents2, &pCP);

        if (SUCCEEDED(hr))
        {
            // Advise the connection point.
            // pUnk is the IUnknown interface pointer for your event sink
            hr = pCP->Advise(pUnk, &dwCookie);

            if (SUCCEEDED(hr))
            {
                // Successfully advised
            }

            pCP->Release();
        }

        pCPC->Release();
    }
} 

pElem would be a frame element in your case.

Hope it helps ... and works;)
GeneralRe: HtmlView, multiframe Pin
jeremysay6-Feb-03 2:04
jeremysay6-Feb-03 2:04 
GeneralRe: HtmlView, multiframe Pin
jeremysay6-Feb-03 3:11
jeremysay6-Feb-03 3:11 
GeneralRe: HtmlView, multiframe Pin
HENDRIK R6-Feb-03 3:28
HENDRIK R6-Feb-03 3:28 
GeneralRe: HtmlView, multiframe Pin
jeremysay6-Feb-03 3:44
jeremysay6-Feb-03 3:44 
QuestionConverSion To Irregular Bitmap ???? Pin
TDS5-Feb-03 22:56
TDS5-Feb-03 22:56 
AnswerRe: ConverSion To Irregular Bitmap ???? Pin
Christian Graus5-Feb-03 23:20
protectorChristian Graus5-Feb-03 23:20 
GeneralRe: ConverSion To Irregular Bitmap ???? Pin
Anonymous12-Feb-03 18:52
Anonymous12-Feb-03 18:52 
GeneralRe: ConverSion To Irregular Bitmap ???? Pin
Christian Graus12-Feb-03 19:05
protectorChristian Graus12-Feb-03 19:05 
GeneralCToolbarCtrl Pin
satyavasu5-Feb-03 22:38
satyavasu5-Feb-03 22:38 
Generallinking libs without .res Pin
Anonymous5-Feb-03 22:03
Anonymous5-Feb-03 22:03 
Generalconfusion Pin
AlexO6-Feb-03 2:44
AlexO6-Feb-03 2:44 
Generalfocus after application exit Pin
aputic5-Feb-03 21:23
aputic5-Feb-03 21:23 
General#undefs Pin
el_scrub5-Feb-03 20:21
el_scrub5-Feb-03 20:21 
GeneralRe: #undefs Pin
Johnny ²6-Feb-03 1:12
Johnny ²6-Feb-03 1:12 
GeneralSDK for GDI+ Pin
reen5-Feb-03 18:38
reen5-Feb-03 18:38 
GeneralUsing XML for a database Pin
paulb5-Feb-03 17:35
paulb5-Feb-03 17:35 
GeneralRe: Using XML for a database Pin
Joan M5-Feb-03 20:32
professionalJoan M5-Feb-03 20:32 

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.