On 30 Mai, 22:58, Boris Zbarsky <[email protected]> wrote:
> On 5/30/11 4:22 PM, Boris Zbarsky wrote:
>
> > You can also getInterface a presshell from a docshell.
>
> More precisely, you can just GetPresShell there.
>
> -Boris

Hi Boris!

Thank you! The following code works now to geht PresShell but how can
i now render in my own DC?
RenderDocument requires gfxContext, but where can I get this one?
There is a gfxSurfaceType   "SurfaceTypeWin32Printing" -> i think i
will need this one :-)


 
nsIInterfaceRequestor* pInterfaceRequestor = NULL;
                                        
mMozView->GetInterfaceRequestor(&pInterfaceRequestor);

                                        nsPIDOMWindow* psPIDOMWindow = NULL;
                                        nsID xIDDOMWindow = NS_PIDOMWINDOW_IID;
                                        if(pInterfaceRequestor)
                                                
pInterfaceRequestor->GetInterface(xIDDOMWindow,
(void**)&psPIDOMWindow);

                                        if(psPIDOMWindow)
                                        {
                                                nsIDocShell* pShell  = 
psPIDOMWindow->GetDocShell();
                                                if(pShell)
                                                {
                                                        nsIPresShell* 
pPresShell = NULL;
                                                        
pShell->GetPresShell(&pPresShell);  // WORKS !!!! :-))

                                                        if(pPresShell)
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to