How to find window reference from CGContextRef?

Hi, I am a highly experienced Windows / Linux developer, but have very little OSX experience (other than using Qt), so sorry, but my question will probably sound rather silly to some of you
Ok, so my question is this: is there some way, using either C/C++ or Objective-C, that I can find a window reference (either HIWindowRef or NSView?) from a CGContextRef?
Since I'm probably asking the wrong question, let me explain slightly... I'm working on an NPAPI (Safari/Firefox) plugin using the Cocoa event model (https://wiki.mozilla.org/Mac:NPAPIEvent_Models#The_Cocoa_eventmodel). In that mode, the plugin only receives a CGContextRef to draw with. However, I'm trying to get Qt's Cocoa classes to draw some fairly complex widgets for me (that code is already built, and working beautifully in a standalone application), so I want to be able to associate a Qt widget with browser's window.
Of course, there may be other ways to convince Qt to do what I want (I'm working on that angle as well), but if I could indeed get some sort of window reference from the CGContextRef, then that would get me a long way there!
Any help / thoughts would be really appreciated!
pc.

Hi,
You can directly refer to the variable as shown below, instead of FindControl.
protected void Page_Load(object sender, EventArgs e)
hypTest.HRef = ''http://www.example.com/'';
When you have master page and page layouts, id will change to dynamic by adding extra as shown in the below example.
<a href="#" id="ctl00_MainContent_hypTest">
<img src="/Images/selbar/1.jpg" id="ctl00_MainContent_isel1" />
</a>
Alternate way is to add the ClientIDMode="Static", then you ID will not change.  Your solution will work 
<a id="hypTest" ClientIDMode="Static" runat="server" href="#">
<img src="/_layouts/15/images/picture.PNG" alt="" />
</a>
Please mark it as answered, if your problem resolved.

Similar Messages

  • How to install Windows 7 from a USB drive!

    This is even easier than installing Windows XP from a USB drive, and will also reduce the time taken to install Windows 7, it took me about 15 minutes!
    The advice in the guide is also applicable to installing Vista.
    You need basically:
    a USB flash drive at least 4GB in size
    a Windows 7 DVD
    To sum up:
    Format your USB drive, with the NTFS filesystem
    Open Command Prompt as an administrator, and run the Bootsect.exe program off the Windows 7 CD to make the USB drive bootable
    Copy the contents of the Windows 7 DVD to the USB drive
    Restart your PC, press F11 (or whichever key it is) to access the Boot menu, and select your USB drive to boot from
    Full guide here:
    http://www.intowindows.com/how-to-install-windows-7vista-from-usb-drive-detailed-100-working-guide/

    Quote from: bnborg on 16-February-11, 10:28:04
    I have done this and it is simple.
    I cleaned and (re)formated an 8GB flash drive under Windows7 using diskpart.  I chose quick format and a fat filesystem.  It doesn't need to be ntfs.  I had diskpart mark the partition active.  I copied the DVD contents to the flash drive.  I also made a folder on it for motherboard drivers.
    After that, I booted the drive on a new machine.  Windows7 setup came up, and didn't find any hard drives, other than the USB flash drive.  I clicked the button to load drivers, and pointed it to the folder I had copied them to on the flash.  Windows installed without problems.
    Hi bnborg..Do u mind sharing with me your motherboard driver folder? I have the MSI U135DX Netbook and each time I hit the button to install Windows 7 it asks me for some mobo driver...Think i might need it to get tru with a successful install..

  • How I find my iphone from my imac off.   hvordan jeg finder min iphone fra min imac af?

    hej jeg står og mangler hjælp til hvordan jeg finder min iphone fra min imac af?
    hello I'm standing and need help with how I find my iphone from my imac off?

    Import photos and videos from your iPhone, iPad, or iPod touch to your Mac or Windows PC - Apple Support

  • Does anybody knows how to install Windows 7 from a USB drive on 2010 MacBook Air running Lion?

    Does anybody knows how to install Windows 7 from a USB drive on 2010 MacBook Air running Lion?

    Tell my wife that!
    This is the best I can do. This way you can use the 2011 MBA way to do things.
    Look for the post from @jacktourist. (on page 2 about half way down) This seems to be the easiest.
    There are a couple of more similar to this with pictures I've seen around but can't remember where.
    Here's another search with added info. It's easier then it sounds.

  • How to acess windows share from Ipad ios 7

    how to acess windows share from Ipad ios 7

    Download an app from the AppStore that provides this functionality. Search for 'access Windows share' for some options.

  • How to find delete message from iphone

    how to find delete message from iphone?

    I am afraid that I don't think there is a way to do this.

  • How to find server model from 11g OEM mgmt$ views

    How to find server model from 11g OEM mgmt$ views
    server model like Dell 710, DL380 G7 etc..,

    It is included in this query (run as user SYSMAN):
    SELECT t.target_name AS host_name,
    ecm_util.HOST_HOME_LIST (t.target_name, t.target_type) AS home_info,
    hw.vendor_name AS Vendor,
    hw.system_config AS System_Config,
    hw.machine_architecture Architecture,
    os.name AS os_name,
    os.base_version os_base_version,
    os.update_level os_update_level,
    os.address_length_in_bits os_address_length_in_bits
    FROM mgmt_targets t, mgmt_ecm_snapshot s, mgmt_hc_os_summary os, MGMT_HC_HARDWARE_MASTER hw
    WHERE t.target_type = 'host'
    AND t.target_name = s.target_name
    AND s.snapshot_type = 'host_configuration'
    AND s.target_type = 'host'
    AND s.is_current = 'Y'
    AND s.snapshot_guid = os.snapshot_guid
    AND hw.snapshot_guid = s.snapshot_guid
    ORDER by t.target_type
    The asked info is available in the view MGMT_HC_HARDWARE_MASTER, column: SYSTEM_CONFIG
    Eric

  • How to find Error Reference Number Additional details in HFM

    <font color="Blue">
    Hi All
    How to find Error Reference Number additional details in HFM ?
    Example:
    Error Reference Number:{01977FBD-DB42-4655-99B5-4ABF38D3E082}
    Where to Find above id additional details??
    I mean HSVErrorLogViewer ? OR RegistrySettings ? OR Dcomcnfg ? OR any other way to find the detailed information?
    Any ideas? Appreciate your help in advance.
    Regards
    Taruni
    </font>

    Hi,
    try menu - EDIT - LUW debug
    and see if you can get the idoc number in this way
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • How to find max(time) from table using group by

    how to find max(time) from table using group by
    select var max(time)
              from table
              into (var1, time1)
               where .....
                 group by var.
    it is fetching record which is top in table.
    if u can help?
    regards.

    No this will fetch the maximum time from teh table.
    select var max(time)
    from table xxxx
    into (var1, time1)
    where .....
    group by var.
    Refer this code
    TABLES SBOOK.
    DATA:  COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
    DATA:  CONNID LIKE SBOOK-CONNID.
    SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
           INTO (CONNID, COUNT, SUM, AVG)
           FROM SBOOK
           WHERE
             CARRID   = 'LH '      AND
             FLDATE   = '19950228'
           GROUP BY CONNID.
      WRITE: / CONNID, COUNT, SUM, AVG.
    ENDSELECT.

  • How to find lost files from Iphone without back up

    How to find lost files from iPhone without back up?

    If you don't have a back up, there's no where to restore them from.

  • How to find PO number from ORDRSP Idoc.

    Hi,
    Can  anybody let me know how to find the PO number from the Idoc ORDRSP.
    Scenario is as below:
    SAP system1 will send PO to SAP system2.(Idoc type ORDRS05).
    When SO is created in SAP system2, it will send a confirmatory Idoc of message type ORDRSP.
    From this I have to find  the PO number as I can find only VBLNR.
    Points assured for workful solutions.
    -B S B

    Hi BSB,
    CHECK THIS CODE
    DATA : BEGIN OF itab_status OCCURS 0,
              idoc           LIKE edids-docnum,
              date_stauus    LIKE edids-logdat,
              status_counter LIKE edids-countr,
              status         LIKE edids-status,
              descrp(70),
              ponumber       LIKE ekpo-ebeln,
              mess           LIKE edidc-mestyp,
    END OF itab_status.
    DATA: text111        LIKE e1mbxyi.
    DATA: text11         LIKE e1edp02.
    IF itab_status-MESS = 'WMMBXY'.
       select single * from edid4  INTO ITAB where segnam = 'E1MBXYI' AND
                     HLEVEL = '02' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT111 ,
    text111-EBELN TO itab_status-ponumber.
    ELSE.
    YOUR CASE FALLS IN THIS CATEGORY****
    select single * from edid4  INTO ITAB where segnam = 'E1EDP02' AND
                     HLEVEL = '03' AND DOCNUM = itab_status-idoc.
    MOVE  : ITAB-SDATA  TO TEXT11 ,
    text11-BELNR TO itab_status-ponumber.
    ENDIF.
    endif.
    LET ME KNOW IF YOU NEED ANYTHING ELSE.
    THANKS
    VENKI

  • How to find user group from tcode

    Hi Experts,
    I have custom tcode from this i found report name as AQIDSYSTQV000001SD_RR_03======
    I am unable to find Queryname in SQ01 from this.
    When i saw some of the forums i  understood that IDSYST is the user group for my query but i am unable to trace such user group in SQ01.
    Please guide me how to find user group for my report
    Thanks&Regards,
    narasimha.

    Hi ,
    I found in table AQGQSTRUC but i didnt find the specified query
    Previously 401 client is there but at present it is not there .How can you justify it that it is 401 client.
    As 401 client data is moved to someother client is it the problem why i am not able to find query??
    Thanks&Regards,
    narasimha.
    Edited by: narasimha02 on Dec 7, 2010 9:54 AM

  • How to find out tcode from a program that can run the same report?

    Hello all,
    I have a program name and I can see it is successfully proccessed. Now if I want to get the report via a tcode, how can I get it?
    How can I find the tcode from the program itself?
    Regards,

    Hi,
    1) Go into SE80, > Enter the name of the program, and press 'Enter'.
    2) You will see a folder called 'Transactions' appearing in the object list on the bottom left.
    3) Open the folder, and you'll find T.code of that program.
    Thanks,
    Nirav

  • How to find Transaction code from Report/program name ?

    Dear all,
    How to find Transaction code if i know Report/program name ?

    Hi,
    In se 38 when u open ur program,in the application toolbar u have a button beside the where-used list button as display object list.on clicking this button,a window will be opened at the left most corner for repository browser,in this u can find any tranasctions,fileds,screens,dictionary structures defined for the program.
    if any transaction is created for the program u can find it under the transaction folder.
    revert back for further queries.
    Regards,
    Sravanthi

  • How to download windows recovery from HP

    i have grub rescue issue , and i want to download windows 7 iso for my pc , i asked microsoft support they told me you have to ask Original Equipment Manufacturer witch is HP in my case ,
    so please can any one help me how to download windows 7 iso , so i can boot from cd and format my pc ?

    You can no longer can download a Windows 7 ISO as of mid February because Microsoft has pulled the plug on downloads.
    If you do not have recovery disks you may order them from HP if available.
    If you live in the USA/Canada, call this number...  1-800-334-5144.
     If you do not live in the USA/Canada, call the HP business PC support number for the country you live in.
     http://h50146.www5.hp.com/lib/doc/manual/desktop/b​​usiness_desktops/6005us_332630_007.pdf
    Please mark my post as SOLVED if it has resolved your problem. It helps others with similar situations.

Maybe you are looking for