Tomasz Pyra napisał(a):

But how to avoid modifing mozilla code, and do all only from my code?

I am trying to investigate how it is done in MFCEmbed, but I need some help.

in mfcembed/components/PromptService.cpp and .h I found overrided function bodies... good.

But I dont undesrstand way, how to enable that overrided functions.

i.e. I create own
class CPromptService: public nsIPromptService
with some my handlers (i.e. PromptUsernameAndPassword)

And now - how to tell Mozilla to use my CPromptSevice instead nsIPromptService.
In MFCEmbed there are things like:


// this is for overriding the Mozilla default PromptService component
#include "PromptService.h"
#define kComponentsLibname _T("mfcEmbedComponents.dll")
#define NS_PROMPTSERVICE_CID \
{0xa2112d6a, 0x0e28, 0x421f, {0xb4, 0x6a, 0x25, 0xc0, 0xb3, 0x8, 0xcb, 0xd0}}
static NS_DEFINE_CID(kPromptServiceCID, NS_PROMPTSERVICE_CID);


what does it means? (what is CID? what is "mfcEmbedComponents.dll"?)

Later there is CMfcEmbedApp::OverrideComponents()
Can you explain me what is going on inside?
Why it is using LoadLibrary?
Is the overrided components in separate dynamic loaded library?

Maybe there is better (easier to start) example of overriding dialogs?
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to