Re: npruntime mfc dialog

Benjamin Smedberg <[email protected]> Thu, 4 Jun 2015 09:56:10 -0400
Newsgroups gmane.comp.mozilla.devel.plugins
Message-ID <[email protected]>
Plugins should not ever present modal dialogs. A modal dialog will block 
the browser from receiving events and will cause it to stop painting, 
and the browser will likely detect that the plugin has hung and kill it 
after 45-60 seconds.

--BDS

On 6/4/2015 4:42 AM, nona wrote:
> Hello,
>
> I have try to insert a mfc dialog box in the npruntime sample. But unable to
> do so.
>
> Anybody know how to insert a dialog box inside the npruntime sample?
> My objective is simple. Click on the html button, called a javascript
> function and then pops the dialog box.
>
> The code below does not give a modal dialog. It works on MessageBox but it
> does not work on domodal dialog. Any idea?
>
> bool
> ScriptablePluginObject::Invoke(NPIdentifier name, const NPVariant *args,
>                                 uint32_t argCount, NPVariant *result)
>   if (name == sFoo_id) {
>      printf ("foo called!\n");
>
> 	MessageBox(NULL, L"Log 1 ", L"Log", MB_OK);
>          CDialog a;
>         a.domodal();
>
>
>
>
>
>
>
>
> --
> View this message in context: http://mozilla.6506.n7.nabble.com/npruntime-mfc-dialog-tp340474.html
> Sent from the Mozilla - Plug-ins mailing list archive at Nabble.com.
> _______________________________________________
> dev-tech-plugins mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-plugins