IRC Log Viewer » #firebreath » 2011-09-05

IRC Nick Time (GMT-7) Message
dougma 00:09 anyone have experience with printing of plugins?
it seems to me, firefox (windows, at least) fails. it doesn't call npp_print and send any draw events
ie printing good.
chrome printing ok (but print preview fails)
dougma 01:09 ok... https://bugzilla.mozilla.org/show_bug.cgi?id=134002
they've been struggling with this for a long time!
donho 02:09 hi there
dougma 02:09 hi don
(notepad++ user here :)
donho 02:09 Hi dougma :)
donho 04:09 How do we get the hInstance of Firebreath?
baga 04:09 hi ppl! how to set CMAKE_BUILD_FLAG for entire firebreath and plugin?
dougma 05:09 donho: LoadLibrary? or GetModuleHandle i suppose... as normal?
donho 06:09 Thank you dougma. Yes I did try GetModuleHandle(NULL); The dialog just don't show in FireBreath. I'm still search the solution to show the dialog...*
dougma 06:09 i haven't tried popping my own windows, but have you tried doing it in your own thread?
i guess the browser's event loop should do the right thing, but maybe with all the ipc going on in your modern browser...?
donho 06:09 What I want to do is to disply my dialog (in win32 api) in the browser.
For the moment, I'm trying to launch a popup dialog in void MyPluginAPI::testEvent(const FB::variant& var) by calling :
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DEMO_DIALOG), NULL, (DLGPROC)ProcHandleMainDialog);
But the dialog just doesn't show. Howerver the call:
::MessageBoxA(NULL, "Before launching the dialog", "It's miracle", MB_OK);
works fine
dougma 06:09 any error return from DialogBox?
dougma 06:09 (also, going forward you can't use DialogBox because you'll block the browser)
donho 06:09 it returns -1
With getLastError it return 1813 - it seems the problem of resource
dougma 06:09 (can't use DialogBox on the main thread ie)
donho 06:09 even if the dialg is modless?
dougma 06:09 well DialogBox won't return until it's done... so no.
donho 06:09 True
I'll use CreateDialog to have a modless dialog
dougma 06:09 gonna try it now myself. :)
donho 06:09 Well that will help me a lot, thank you dougma
always 1813 (The specified resource type cannot be found in the image file) with CreateDialog() :(
dougma 06:09 and which browser are you using donho?
donho 06:09 the dialog does be in firebreathWin.rc, just don't understand why
Chrom and firefox
dougma 07:09 ok, getting the same error code
donho 07:09 1813?
dougma 07:09 yeah
GetModuleHandle(NULL) will give the .exe won't it?
or the .dll?
GetModuleHandle(L"npFBTestPlugin.dll") works :)
i have dialog.
donho 07:09 Well the current modul so it should be dll
terrific !
I'll try now
dougma 07:09 "If this parameter is NULL, GetModuleHandle returns a handle to the file used to create the calling process (.exe file)."
says msdn :/
donho 07:09 well, that explain 1813!
YES!
Thank you dougma!
dougma 07:09 np, learnt something too. :)
donho 07:09 I'll try to integrate it into browser now
dougma 07:09 definitely don't go block that main thread though
i just did with passing a null dialogproc to DialogBox and it wasn't pretty. :)
i'm off. g'night