How to get IHTMLDocument2 of each newly created tab?

Hi there,
I'm working on an C++ IE automation application that opens multiple URLs. Each URL is opened in a new tab of the same IE instance. My problem is: How do I get a IHTMLDocument2 of each tab that the application just created? When I use the same IWebBrowser2
interface to open the tabs in the same IE instance, I always get the IHTMLDocument2 of the first tab.
This is what I do:
1. Call the CoCreateInstance method for the "InternetExplorer.Application"
2. QueryInterface from "InternetExplorer.Application" to IDispatch
3. QueryInterface from IDispatch to IWebBrowser2. For each URL that should be opened, I call the navigate-method on the same "IWebBrowser2"-interface. The navigate-method has a FLAGS-parameter, which I set to "navOpenInNewTab" in order
to open new tabs each time I call the method.
This all works fine, except that I'm not able to get the IHTMLDocument2 of each tab I just created. As I just said, I'm performing multiple calls to the navigate-method on the same "IWebBrowser2"-interface in order to open the new tabs in the same
IE-instance. But when I call the get_Document-method on the "IWebBrowser2"-interface, I always receive the document of the first tab. How can I get the document of the second, third, etc. tab?
Any suggestions?

problem is 1 there isn't an event for browser saying "NewTabCreated" and even if you wrote one, you would have a hard time sending anything to the outside of the sandbox without extra accommodation (e.g. create a named pipe then grant access to
low integrity level processes). 
Why the methods mentioned above won't work reliably:
IShellWindow is broken since Vista (Only trusted sites running in normal
integrity level would be displayed)
As a Windows Message, WM_HTML_GETOBJECT would be subject to
User Interface Privilege Isolation which has the same blocking effect. 
DWebBrowserEvents2::NewProcess is best as a tab creation is guaranteed at this time, but
a new process is not guaranteed when you create a new tab so you would miss some tab creations.
Visual C++ MVP

Similar Messages

  • How to get LASTDAY for each and every month between given dates..

    Hi Friend,
    I have a doubt,How to get LASTDAY for each and every month between given dates..
    for ex:
    My Input will be look like this
    from date = 12-01-2011
    To date = 14-04-2011
    And i need an output like
    31-01-2011
    28-02-2011
    31-03-2011
    is there any way to achieve through sql query in oracle
    Advance thanks for all helping friends

    Here's a 8i solution :
    select add_months(
             trunc(
               to_date('12-01-2011','DD-MM-YYYY')
             ,'MM'
           , rownum ) - 1 as results
    from all_objects
    where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
                                      trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
    The above two query is worked in oracle 11GActually the first query I posted is not correct.
    It should work better with
    months_between(
       trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
       trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
    )Edited by: odie_63 on 12 janv. 2011 13:53
    Edited by: odie_63 on 12 janv. 2011 14:11

  • How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?

    How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
    Hi,
    I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
    but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
    ( f.ex. cannot verifying it correct in xmlspy )
    my dbms is
    NLS_CHARACTERSET          = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET     = AL16UTF16
    NLS_RDBMS_VERSION     = 10.2.0.1.0
    I do generate it in this matter :
    declare
    xmldoc CLOB;
    ctx number ;
    utl_file.file_type;
    begin
    -- generate fom xml-view :
    ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
    DBMS_XMLGEN.setRowSetTag(ctx, null);
    DBMS_XMLGEN.setRowTag(ctx, null );
    DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
    -- create xml-file:
    xmldoc := DBMS_XMLGEN.getXML(ctx);
    -- put data to host-file:
    vblob_len := DBMS_LOB.getlength(xmldoc);
    DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
    bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
    UTL_FILE.put_line(bHandle, vbuffer, FALSE);
    UTL_FILE.fclose(bHandle);
    end ;
    maybe while work UTL_FILE there is a change the encoding ?
    How can this solved ?
    Thank you
    Norbert
    Edited by: astramare on Feb 11, 2009 12:39 PM with database charsets

    Marco,
    I tryed to work with dbms_xslprocessor.clob2file,
    that works good,
    but what is in this matter with encoding UTF-8 ?
    in my understandig, the xmltyp created should be UTF8 (16),
    but when open the xml-file in xmlSpy as UTF-8,
    it is not well ( german caracter like Ä, Ö .. ):
    my dbms is
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_RDBMS_VERSION = 10.2.0.1.0
    -- test:
    create table nh_test ( s0 number, s1 varchar2(20) ) ;
    insert into nh_test (select 1,'hallo' from dual );
    insert into nh_test (select 2,'straße' from dual );
    insert into nh_test (select 3,'mäckie' from dual );
    insert into nh_test (select 4,'euro_€' from dual );
    commit;
    select * from nh_test ;
    S0     S1
    1     hallo
    1     hallo
    2     straße
    3     mäckie
    4     euro_€
    declare
    rc sys_refcursor;
    begin
    open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
    dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
    end;
    ( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
    open in xmlSpy is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <S0>1</S0>
    <S1>hallo</S1>
    </ROW>
    <ROW>
    <S0>2</S0>
    <S1>straޥ</S1>
    </ROW>
    <ROW>
    <S0>3</S0>
    <S1>m㢫ie</S1>
    </ROW>
    <ROW>
    <S0>4</S0>
    <S1>euro_€</S1>
    </ROW>
    </ROWSET>
    regards
    Norbert

  • How to get control on each row in advance table

    hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
    for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
    if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
    onetime.setSelected(true);
    recurring.setSelected(false);
    else
    onetime.setSelected(false);
    recurring.setSelected(true);
    but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....

    Babu,
    Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get total at each hierarchy

    Hello Gurus,
    Does anybody know how to get total at each  level.
    I mean, if I have the following structure...
    Level 1
    Level 2
    Level 3
    Level 4
    Level 5
    At level 5 we have the following calculation
    Volume      Price    Amount(From Formula Volume * price)
    5                 2           10,00
    6                 3           12,00
    7                 4            28,00
    My question is how to get  a sum of (10,00 + 12,00 +28,00 = 50,00) at level 4?
    Thanks in advance.
    With regards,
    Anand

    Does anybody know how to get total at each level.
    I mean, if I have the following structure...
    Level 1
    Level 2
    Level 3
    Level 4
    Level 5
    At level 5 we have the following calculation
    Volume       Price       Amount(From Formula Volume * price)
    5                     2                 10,00
    6                     3                 12,00
    7                     4                  28,00
    I am getting following results : It is adding volume and price then multiplying volume * price and giving results.
    18                  9                18 * 9 = 162,00
    But I have to get sum of  ( 10,00 + 12,00 +28,00 = 50,00) at level 4.
    My question is how to get a sum of (10,00 + 12,00 +28,00 = 50,00) at level 4?
    Thanks.
    With regards,
    Anand

  • How to get the name of the current tab.

    Hi Experts,
    I have two tabs in my tab strip and a button common to both the tabs.Can you please let me know how to get the name of the current tab in the event method of the push button.
    Thanks in advance.
    Regards,
    Arun

    1.Declare an Action for OnSelect event of Tabstrip. This event is triggered whenever any change in tab occurs.
    2. Declare an Import Parameter in this method
       Tab type String.
    3. This parameter has value of the selected TAB.
    4. You can set this value in some Attribute in Attribute Tab in this event only (OnSelect):
         wd_this->Att  = Tab.
    Att is the attribute created by you in Attributes Tab of View. ( of type String)
    5. Now the selected Tab ID is stored in this Attribute Att.
    6. In the Onaction of Button , retrieve the selected tab value from this attribute using :
               Data : lv type string.
                lv =  wd_this->Att
    Now lv has your selected TAB ID.
    I hope it would help you.
    Edited by: Saurav Mago on Oct 13, 2009 2:22 PM

  • How to read status of a newly created notification

    Hello All,
    I have implemented a BTE for the event PM000010 - Update Notification.
    Now my problem is that I wish to read the existing statuses on the notification.
    This works fine if the notification already existed before.
    However, if the notification is newly created, then Function Modules STATUS_CHECK and STATUS_READ do not work.
    This is only if the notification is newly created.
    I am particularly interested to know if the status Notification In Process and Notification Completed are present on the order.
    How do I achieve this since STATUS_CHECK and STATUS_READ are not able to fetch the statuses when the notification is newly created?
    Thanks,
    Mithun

    hi
    check out the below details
    Where to get the table which is having user status with Notiifcation number.  (not the system status).
    By : Selva
    1. From table QMEL get OBJNR(object number) using the QMNUM( notification number).
    2. Using this OBJNR get STSMA( Status Profile) from table JSTO.
    3. Using the OBJNR get STAT(object status) from table JEST.
    You may/ may not get multiple object status for an Object number.
    System status number will start from E.
    User status number will start from I.
    4. To get the text of the status, use the status number (STAT) and STSMA to get the status text from table TJ30T.
    We have done this and working fine.

  • How to get sum for each currency's in ALV Report

    Hi,
    A column has amounts with various currency's.
    May I know how to get sum quantity for each currency in ALV Report?
    Thanks in advance.

    Hi,
    Currency value column should have reference to currency code column.
    Regards,
    Wojciech

  • How to know which row is newly created in the table

    Hi all
    i have one classic table with a button to add new row.
    when page renders initially it displays some record .Here user can either update the previously existing record or may create new ones .
    after adding one more row when users submits it , in back-end i need to go thru all the rows in the view to do some validations .but i need to insert newly created row using API. how can i know which row haas been newly created,
    pls help

    you can know which row is new using different techniques at different places, depending where you want to do it.
    1. In AMImpl: if the PK column attribute of the row does not have a value, then you know this is a new row.
    2. In EOImpl: insertRow will be executed only if it is a new row.
    3. In Pl/SLQ package (if being called from EOImpl): You can check the creation_date or OVN for the row and determine if this is a new row.
    4. You can use the method mentioned in this thread
    Row Status Question
    Thanks
    Tapash

  • How to get the pid for a created process

    hi all,
    i want to get the pid for a newly created process using java. but somebody told to check it in jni. but i didnt get exact solution till now. is anyone there known about this means pls send the code.
    advance thanks
    hidash.....
    i have a personnel mail id u can send ur code to this id
    mailto:[email protected]
    Edited by: Hidash_Kumar on Jan 4, 2008 12:51 AM

    Please run the Process flow and in Execution double click on Job id
    You will see all parameters values in job

  • How do get your applications that you create in x code to you iphone

    How do you get your applications that you create in x code to your iphone so it can be tested?

    Use the resources you paid for in the iOS Dev Center...
    Xcode Overview
         Run Your App

  • How to get IAttributeStrand for each Cell in Table

    Hello All,
    I am trying to set the font and size depending upon the user inputs under each cell in the table.
    For Text frame I am able to achieve this by using ITextModel->QueryStrand(). But for Table I am not able to find any function which can allow me to query the Cell Strand and allow to apply the attributes.
    Has anyone been able to achieve the same. If so please do let me know its urgent.
    Thank you all in advance.
    regards
    Farzana.

    Hi,<br /> <br />Thanks for the prompt reply. By the way I forgot to mention that we are using the same in CS3.<br />We tried as you have mentioned in your mail. But we did not find any way to achieve the ITextStoryThread from ICellConent. We tried all possible ways but we always get the Text Frame TextModel.<br />We have used following code to get TextModel for each cell. We get correct startindex and endindex for each cell and also get the valid TextModel Interface. But when we try to find out its length then it returns the whole TextModel length. <br />Thus when we try to apply different attributes for each cell then it applies to whole table. <br />E.g. When we try to apply 12 font size for 1st cell then it also applies to remaining cells.  So we think we are not able to find out correct TextModel for each cell. <br /> <br />Below is our snippet of code on what we tried.<br /> <br />ITableModel::const_iterator iterTable(tableModel->begin());<br />ITableModel::const_iterator end(tableModel->end());<br /> <br />while(iterTable != end) <br />{<br />GridAddress gridAddress = *iterTable; <br />GridID gridid= tableModel->GetGridID(gridAddress);<br /> <br />   InterfacePtr<ITableTextContainer> tableTextContainer(tableModel, UseDefaultIID());<br />   if(tableTextContainer != nil) <br />   {<br />       InterfacePtr<ITextModel> textModel(tableTextContainer->QueryTextModel());<br />       if(textModel != nil) <br />       {<br />          InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());<br />          if (textStoryThreadDict != nil) <br />          {<br />              InterfacePtr<ITextStoryThread> textStoryThread(textStoryThreadDict->QueryThread(gridid));<br />              if (textStoryThread != nil)<br />              {<br />                 InterfacePtr<ITextModel> iTextModel(textStoryThread->QueryTextModel());<br />                 if (iTextModel != nil)<br />                 {<br />                      TextIndex startIndx;<br />                      TextIndex endIndx;<br />                      startIndx=textStoryThread->GetTextStart(&endIndx);<br />                 }<br />                 else<br />                     CAlert::ErrorAlert("iTextModel == nil");<br />             }<br />          }<br />       } <br />   }<br />                                     <br />   ++iterTable;    <br /> }<br /><br />Regards,<br />Farzana.

  • How to login with ddic in newly created client

    dear all,
    I am using SAP NETWEAVER 7.0 EHP1. I have created a client 400 in production and i want to login with ddic but i dont understand what will be the password for that.As for sap* is pass and for ddic=? . I also use 19920706 for ddic but still it is not allowing to log on.please tell me is it possible to log on with ddic in newly created client. and sap* is working but not ddic.
    thanks

    Dear Abhishek,
    Before you proceed to Create Jobs & Positions first you check whether the Personnel Actions (PA40) is configured or not. Then after uploading the employeee master data you can proceed to other process.
    if PA40 is not configured then Configure in SPRO using PA/PM/Customizing procudures/ Infotype Menus etc. You can also maintain user profile using Tcode. SU3.
    All the best.
    Rgds,
    Vikrant

  • Product - How to get the list of products created.

    We have a Job running which actually creates products in CRM.
    Is it possible to get those list of freshly created / updated products created in CRM so that the user who is supposed to further update those products can find them easily.
    Note: This job is a job which resides in the non-SAP system and using XI interface is that we create the products.

    Hey thanks all for the quick replies. Appreciate that.
    The problem which I need to address is that, I know there are certain set of products being uploaded in my CRM. Is there any facility in CRM like a Job which can monitor on the delta changes made to the products and when I run a report those delta changes are visible.
    The current work-around which I have at present is from the non-SAP system we know the list of products that get uploaded. We can pass that as a text file to the user so that he can get the list of products uploaded in CRM. But we dont want to adopt this approach.
    We want some kind of an interface within CRM which should enable us to do this.
    Any thoughts ?
    Best Regards

  • How to get rid of D.O.T tab&MSI info tab?

    Hiya people
    Does anyone have any idea,s on how to get rid of the msi info and DOT tabs in the display properties
    I,ve looked thru the forums and someone said the msi drivers introduce a new dll to the win/system32 folder and the only way is to format the drive ,i don,t wonna do that as i,ve just recently formatted.
    Its not a major fault or anything as i think they are harmless, they just annoy me being there,i prefer coolbits for my overclocking.
    Any idea,s would be greatly appreciated thanks
    AthlonXP2800+ Bartoncore @2083MHZ WinXP pro sp1
    Epox NForce2 8RDA+ mobo
    2x512MB dualchannel enabled
    MSI NX6800GT 256MB videocard @400core  1100mem forceware 65.73beta
    Audigy Soundcard + 5.1 soundsystem
    Sony Trinitron 21inch FlatDisplay

    Quote
    Originally posted by CDM
    Well Congrats on answering your own question with in 16 minutes  

Maybe you are looking for

  • Re-download and re-installation of licensed program

    In connection with a crash my photoshop elements program (for which I have a license) disappeared. How can I download and re-install the program?

  • TS2446 how can you change your security questions on itunes?

    i have been locked out of my apple id on itunes, and i dont know how to change my security questions please help!!

  • Execution time in microseconds

    Hi, Can someone tell me what should be the ideal execution time of a program in microseconds. My program consists of 2586 lines and has almost around 10 subroutines and some 10 function modules. Could you suggest me how the execution time is determin

  • Net Income account in General Ledger

    I have a requirement of finding out a period's (say June-00) Current Profit/loss(Income - Expenses) in GL. I have enabled Average Balace Option in the Set of Books. I had specified a Net Income Account. Does Net Income account carry standard balances

  • Need help with flash templates in Mac...

    Hello,  I did some searches in the forum but found nothing. I have a problem.  I have a Mac and and using Dreamweaver CS5.5. Recently I download some templates with flash from Hostgator. The message I get is:   "This page contains some SWF objects th