Hi

I am working on to creating new custom web browser through Mozilla API.

I have been created initial functionality for browser and its work properly.

Now problem is occurred when work on printing functionality.

I am using nsIWebBrowserPrint (This interface controls the printing of an
embedded Gecko WebBrowser window/document).

I am using one function Print() which is dine below

 

Print()

{

      nsCOMPtr<nsIWebBrowserPrint> print(do_GetInterface(webBrowser));

      NS_ENSURE_TRUE(print, FALSE);

      

      

      if (!mPrintSettings) InitPrintSettings();

      

      nsresult rv;

      CPrintProgressDlg* dlg= new CPrintProgressDlg(Parent);

       rv =
print->Print(mPrintSettings,static_cast<nsIWebProgressListener*>(dlg->m_Prin
tListener.get()));

      NS_ENSURE_SUCCESS(rv, FALSE);

 

      if (dlg->DoModal() != IDOK) {

            print->Cancel();

            return FALSE;

      }

      return TRUE;

} 

 

In case, it is not give proper response. According to bold line in given
function will execute. Print dialog should be display and click on ok. Then
print will be execute.

But it s not work.

 

If you know anything about this problem or related person then please
intimate me by mail. 

Thanks

 

Regards

tim

 

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

Reply via email to