You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
roytam1 888e6d509f fix CanCopy2() when handling framesets 4 years ago
Install fixup commit for tag 'kmeleon75' 7 years ago
app fix CanCopy2() when handling framesets 4 years ago
base Add incomplete mozbuild 7 years ago
chrome Update kmprefs to KM76Rc2 + updates 5 years ago
components history: update git copy with KM76RC2 5 years ago
config Add incomplete mozbuild 7 years ago
default settings: update default/settings folder 5 years ago
fuel Add incomplete mozbuild 7 years ago
kplugins adblock: exclude unused part from compilation, add missing return paths 5 years ago
loader Remove SSE2 requirement and fix intermediate path 7 years ago
locales update en-us locale files to KM76RC2 + updates 5 years ago
modules modules: update git folder contents with KM76RC2 5 years ago
newsfox Add incomplete mozbuild 7 years ago
shared Add incomplete mozbuild 7 years ago
skins Add incomplete mozbuild 7 years ago
themes Add incomplete mozbuild 7 years ago
utils fixup commit for tag 'kmeleon75' 7 years ago
winEmbed add manifest into vcxproj 5 years ago
KMeleon.dsp fixup commit for tag 'kmeleon75' 7 years ago
KMeleon.dsw fixup commit for tag 'kmeleon75' 7 years ago
KMeleon.sln Update for Gecko 38 / MSVC 2013 7 years ago
KMeleon10.sln adblock: add adblock to build 5 years ago
KMeleon10.suo Add incomplete mozbuild 7 years ago Add incomplete mozbuild 7 years ago
README.TXT fixup commit for tag 'kmeleon75' 7 years ago Add incomplete mozbuild 7 years ago
app.mozbuild Add incomplete mozbuild 7 years ago Add incomplete mozbuild 7 years ago Add incomplete mozbuild 7 years ago Add incomplete mozbuild 7 years ago Add incomplete mozbuild 7 years ago
mozilla.patch Fix crash when closing tab 7 years ago


/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
* The Original Code is code.
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
* Contributor(s):
* Chak Nanga <>

This sample shows how to embed Mozilla from within
an MFC Windows application

Mainly demonstrates the use of the following interfaces:


General Overview:

1. The MfcEmbedApp creates BrowserFrames

2. BrowserFrame creates the toolbar, statusbar, URLbar
BrowserView etc.
BrowserFrames implement the IBrowserFrameGlue interface
using which new BrowserFrames can be created, statusbar
updated etc.

3. BrowserView creates the embeddable browser instance and
manages user interaction such as URL navigation etc.
BrowserView connects the BrowserImpl with the BrowserFrame
via the IBrowserFrameGlue interface

4. BrowserImpl implements the set of required/optional Gecko
embedding interfaces

Start by first looking at MfcEmbed.cpp


- Includes the required Mozilla header files

- CWinApp derived class
- Creates the browser's main frame window etc
using the CreateNewBrowserFrame() and loads
the HomePage
- Makes the required NS_InitEmbedding() and the
NS_TermEmbedding() calls in the app's InitInstance()
and ExitInstance() functions
- Keeps track of the list of new BrowserFrames created
which it cleans up properly in ExitInstance()

- This is the browser's Frame window i.e. the one with the
"chrome" - with the toolbar, urlbar etc.
- Creates the toolbar, URLbar, statusbar, progressbar
also the browser's view window.

- Implements the IBrowserFrameGlue interface. This interface
contains platform specific implementations of functions to
update the statusbar, creating new browser frames etc. Embedded
browser's callbacks use this interface when needed

- Creates the embedded browser object and handles most aspects
of the embedded browser interactions - like URL navigation,
clipboard interactions etc
- Also has code to keep the menu/toolbar/statusbar UI items up
to date
- It's the view which conntects the BrowserFrame to the BrowserImpl
(see below) by passing it the pointer to IBrowserFrameGlue

- Implements the required and/or optional embedded browser
(BrowserImpl.cpp implements the set of interfaces which
are required by Gecko of all embedding apps. The other
interfaces implemented in the BrowserImpl*.cpp files are

- Calls on the statusbar/progressbar update functions exposed
via the IBrowserFrameGlue in response to the nsIProgressListener
interface callbacks

- Contains dialog box code for displaying Prompts, getting
passwords, getting username/passwords etc

winEmbedFileLocProvider.cpp, ProfilesDlg.cpp, ProfileMgr.cpp
- Profile management related code (by Conrad Carlen)

- This is a simple test harness for excercising some of the
implemented interfaces . For ex, the nsIWebBrowserChrome.
- Open the file in mfcemed by typing the following in it's
location bar. For ex:

- Read/Click on the links on that page more info
- This test page is just a start and will add more test
case to it over time
- We define "_AFXDLL" and for the compiler and specify
"-SUBSYSTEM:windows" for the linker using LCFLAGS and
LLFLAGS, respectively

mfcembed.dsp and mfcembed.dsw
- These VisualStudio workspace/project files can be used
to open/build this sample inside of the VC++ IDE