From 025ac8dfbaa6d65e75e4f607dbe6948558d80f54 Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Thu, 22 Apr 1999 23:28:09 +0000 Subject: [PATCH] Approved: leaf@mozilla.org New Mozilla control registering tool git-svn-id: svn://10.0.0.236/trunk@28769 18797224-902f-48f8-a5cc-f745e15eee43 --- .../tests/RegMozCtl/MozillaBrowser.ico | Bin 0 -> 4710 bytes .../embed/ActiveX/tests/RegMozCtl/ReadMe.txt | 88 ++++++++ .../ActiveX/tests/RegMozCtl/RegMozCtl.cpp | 74 +++++++ .../ActiveX/tests/RegMozCtl/RegMozCtl.dsp | 150 ++++++++++++++ .../embed/ActiveX/tests/RegMozCtl/RegMozCtl.h | 49 +++++ .../ActiveX/tests/RegMozCtl/RegMozCtl.rc | 193 ++++++++++++++++++ .../ActiveX/tests/RegMozCtl/RegMozCtlDlg.cpp | 157 ++++++++++++++ .../ActiveX/tests/RegMozCtl/RegMozCtlDlg.h | 53 +++++ .../embed/ActiveX/tests/RegMozCtl/StdAfx.cpp | 8 + .../embed/ActiveX/tests/RegMozCtl/StdAfx.h | 29 +++ .../ActiveX/tests/RegMozCtl/res/RegMozCtl.ico | Bin 0 -> 1078 bytes .../ActiveX/tests/RegMozCtl/res/RegMozCtl.rc2 | 13 ++ .../embed/ActiveX/tests/RegMozCtl/resource.h | 20 ++ 13 files changed, 834 insertions(+) create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/MozillaBrowser.ico create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/ReadMe.txt create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.cpp create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.dsp create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.h create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.rc create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.cpp create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.h create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.cpp create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.h create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.ico create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.rc2 create mode 100644 mozilla/webshell/embed/ActiveX/tests/RegMozCtl/resource.h diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/MozillaBrowser.ico b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/MozillaBrowser.ico new file mode 100644 index 0000000000000000000000000000000000000000..01c6f785d3e017ea6566acd7417bd92193112f33 GIT binary patch literal 4710 zcmeH~PiP!f9LImVNp-1#B(mF6in}i!rYqgXo!vtN#Tpl(fkL9Bdnwe@;7vTWh|oc> ziUukOC39)RMnwli>9MChd9ZVCF9w1=RBFH!FQKh@etz%mCQaOwdhld_yT5tw_vih7 z-}${a^WKQ$WLV1OF;V(0FY+es*qE1toJeg*u&Y(%+k(iMVYPet-2)<9BO(D}89oVX zJf)aegDJ*{C60Z=m9BKVU0O9*_ZMrm2lG>vUUsN3|N4%gy|)*3$p;qR+6!QpJQa`S zxwCDWUwE-Ty)DU9E@wJvPd270!};md%SObQ$v5(;myI!H6b4c4`LZ$9vf%9Hx=HJu z&XjtmlOjVV?P#|=#HB+dZ6?#|iiWR?YE!~ZrpwiQYJ8ZowxYCmurqHH4dGD_w zQUZ0#Z3S>=bnsQ}eRQ3{2BM5m!vFATMmZ5;LrmKdDxc!p7*vYuL;0I8o%{ z18aNXo#w&^KRoOx`X0qM(sVhU>WeIe8|m_o+oE;~z1)4}r#s$G#lm_DvUZDg@Hjt0 zR^AXAv0cA(wupr&oA3s_26ua`eYM*d#%OVZbBuo;9)(}BkGdD_)&-W_`|v~9ldkhI zxD5B#d6)iRido}WSktcIO84p4dG2EdL%BKM9vCy)sh9Iie%|CwHDx(f%T?Chv|9lk zW>Ko0ytW#)qQ`0~N@Ioi=r9=LTDC`|>+W6o z;=Aw35W*3hz?m0AbRoJBU8p*4L|r2E5uFHqgg!#A!xHof`UD|CpP;9a41I<^L!Y6@ zv>?b9*=8BB?3phidHfIAl~=0+Dsm_I zxl)rm0aHTKgaiqg5^^UP6LKfyPRQ-1!{tU#{)GGq`E`mC@+Z_L0Yd_YggWT7Q5ARh zXlS|WG*W|%d>Pm>aAf3jQ>!?rK?aUYad2a9x*3##B?C(ah>V1834kSIV1`qMA_EJ5 zm^jQy29`|g;jrjx&{;qS1`7rY1`7rY1`7taoWPKQ!GghpAp-+pVEn;g!C=8)!9Zvj zJs2z)EEp^REcr8nSq561B4R|y5jd=itv-=d-!eg9^mRXg6kRK*1-04$qs(gb62@As zvD<#ERtx4@SjW}efOhOP&{PcSASf1#J@d95E#bJKiiTCv(T#q7Z&tObm~CsLk8e%~ z_lXd0tPc0%fz>Beji6$@14_lGHs|b}7*+{%EPu84%t)ZqMEHW%rxZ~~N6xMe8jCy8 z;ncV3t*We10q(ES&`PKrX#Jawo=Yzf_Q1u!UQ&F}86QNU^wYWUGv3U#?L79FgB`mI z(j?Qb^FA1^L1~v=+E$8J*L$%PU8$enr&+RMu34G2noEa&zMbB8u36jEbA&V3PVKRZ zEG=DY;LvXLYrDr|*4+juD~-nd9-E3q&Ifvx7!-F=qRbKQS%p8M=am1= zIc1%#-@Qh81t|S~qO?mconRODCOLZaXz4H;vfIb!I8amqwnpC2*!`v)u$A({M%29t zLcvvzsaL>u$zG|l+XLM;ucAAbuurv{&2|%ik7wzsumzoEL~mbOwM(lOdk+n-_ICSh zt=9XTL|dF~A9Jz#9=!PnzTLOK1=swyGoQ`>_#RZ9ekVTCZ$afz&Uo*+W1svD!0_@; literal 0 HcmV?d00001 diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/ReadMe.txt b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/ReadMe.txt new file mode 100644 index 00000000000..76a553ecfc2 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/ReadMe.txt @@ -0,0 +1,88 @@ +======================================================================== + MICROSOFT FOUNDATION CLASS LIBRARY : RegMozCtl +======================================================================== + + +AppWizard has created this RegMozCtl application for you. This application +not only demonstrates the basics of using the Microsoft Foundation classes +but is also a starting point for writing your application. + +This file contains a summary of what you will find in each of the files that +make up your RegMozCtl application. + +RegMozCtl.dsp + This file (the project file) contains information at the project level and + is used to build a single project or subproject. Other users can share the + project (.dsp) file, but they should export the makefiles locally. + +RegMozCtl.h + This is the main header file for the application. It includes other + project specific headers (including Resource.h) and declares the + CRegMozCtlApp application class. + +RegMozCtl.cpp + This is the main application source file that contains the application + class CRegMozCtlApp. + +RegMozCtl.rc + This is a listing of all of the Microsoft Windows resources that the + program uses. It includes the icons, bitmaps, and cursors that are stored + in the RES subdirectory. This file can be directly edited in Microsoft + Visual C++. + +RegMozCtl.clw + This file contains information used by ClassWizard to edit existing + classes or add new classes. ClassWizard also uses this file to store + information needed to create and edit message maps and dialog data + maps and to create prototype member functions. + +res\RegMozCtl.ico + This is an icon file, which is used as the application's icon. This + icon is included by the main resource file RegMozCtl.rc. + +res\RegMozCtl.rc2 + This file contains resources that are not edited by Microsoft + Visual C++. You should place all resources not editable by + the resource editor in this file. + + + + +///////////////////////////////////////////////////////////////////////////// + +AppWizard creates one dialog class: + +RegMozCtlDlg.h, RegMozCtlDlg.cpp - the dialog + These files contain your CRegMozCtlDlg class. This class defines + the behavior of your application's main dialog. The dialog's + template is in RegMozCtl.rc, which can be edited in Microsoft + Visual C++. + + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named RegMozCtl.pch and a precompiled types file named StdAfx.obj. + +Resource.h + This is the standard header file, which defines new resource IDs. + Microsoft Visual C++ reads and updates this file. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" to indicate parts of the source code you +should add to or customize. + +If your application uses MFC in a shared DLL, and your application is +in a language other than the operating system's current language, you +will need to copy the corresponding localized resources MFC42XXX.DLL +from the Microsoft Visual C++ CD-ROM onto the system or system32 directory, +and rename it to be MFCLOC.DLL. ("XXX" stands for the language abbreviation. +For example, MFC42DEU.DLL contains resources translated to German.) If you +don't do this, some of the UI elements of your application will remain in the +language of the operating system. + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.cpp b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.cpp new file mode 100644 index 00000000000..ab0e4da9b4a --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.cpp @@ -0,0 +1,74 @@ +// RegMozCtl.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "RegMozCtl.h" +#include "RegMozCtlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlApp + +BEGIN_MESSAGE_MAP(CRegMozCtlApp, CWinApp) + //{{AFX_MSG_MAP(CRegMozCtlApp) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlApp construction + +CRegMozCtlApp::CRegMozCtlApp() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CRegMozCtlApp object + +CRegMozCtlApp theApp; + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlApp initialization + +BOOL CRegMozCtlApp::InitInstance() +{ + AfxEnableControlContainer(); + + // Standard initialization + // If you are not using these features and wish to reduce the size + // of your final executable, you should remove from the following + // the specific initialization routines you do not need. + +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif + + CRegMozCtlDlg dlg; + m_pMainWnd = &dlg; + int nResponse = dlg.DoModal(); + if (nResponse == IDOK) + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + else if (nResponse == IDCANCEL) + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.dsp b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.dsp new file mode 100644 index 00000000000..2fcd77565a2 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.dsp @@ -0,0 +1,150 @@ +# Microsoft Developer Studio Project File - Name="RegMozCtl" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=RegMozCtl - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "RegMozCtl.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "RegMozCtl.mak" CFG="RegMozCtl - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "RegMozCtl - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "RegMozCtl - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "RegMozCtl - Win32 Release" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 +# ADD LINK32 /nologo /subsystem:windows /machine:I386 + +!ELSEIF "$(CFG)" == "RegMozCtl - Win32 Debug" + +# PROP BASE Use_MFC 5 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 5 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "RegMozCtl - Win32 Release" +# Name "RegMozCtl - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\RegMozCtl.cpp +# End Source File +# Begin Source File + +SOURCE=.\RegMozCtl.rc +# End Source File +# Begin Source File + +SOURCE=.\RegMozCtlDlg.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\RegMozCtl.h +# End Source File +# Begin Source File + +SOURCE=.\RegMozCtlDlg.h +# End Source File +# Begin Source File + +SOURCE=.\Resource.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=.\MozillaBrowser.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RegMozCtl.ico +# End Source File +# Begin Source File + +SOURCE=.\res\RegMozCtl.rc2 +# End Source File +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.h b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.h new file mode 100644 index 00000000000..695a7a08247 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.h @@ -0,0 +1,49 @@ +// RegMozCtl.h : main header file for the REGMOZCTL application +// + +#if !defined(AFX_REGMOZCTL_H__C7C0A786_F424_11D2_A27B_000000000000__INCLUDED_) +#define AFX_REGMOZCTL_H__C7C0A786_F424_11D2_A27B_000000000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ + #error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlApp: +// See RegMozCtl.cpp for the implementation of this class +// + +class CRegMozCtlApp : public CWinApp +{ +public: + CRegMozCtlApp(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegMozCtlApp) + public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CRegMozCtlApp) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGMOZCTL_H__C7C0A786_F424_11D2_A27B_000000000000__INCLUDED_) diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.rc b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.rc new file mode 100644 index 00000000000..57e7f26e850 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtl.rc @@ -0,0 +1,193 @@ +//Microsoft Developer Studio generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_REGMOZCTL_DIALOG DIALOGEX 0, 0, 210, 101 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_APPWINDOW +CAPTION "RegMozCtl" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "This application registers/deregisters the Mozilla Control and ensures that its dependent DLLs are listed as SHARED so that they can be found when the control is used by other applications.", + IDC_STATIC,34,7,169,35 + LTEXT "You must run this program from the directory containing the Mozilla control and click on the Register or Deregister as appropriate.", + IDC_STATIC,34,47,169,25 + DEFPUSHBUTTON "&Register",IDC_REGISTER,7,80,50,14 + PUSHBUTTON "&Unregister",IDC_UNREGISTER,80,80,50,14 + PUSHBUTTON "&Close",IDCANCEL,153,80,50,14 + ICON IDI_ICON2,IDC_STATIC,7,7,21,20 +END + + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "RegMozCtl MFC Application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "RegMozCtl\0" + VALUE "LegalCopyright", "Copyright (C) 1999\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "RegMozCtl.EXE\0" + VALUE "ProductName", "RegMozCtl Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // !_MAC + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_REGMOZCTL_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 203 + TOPMARGIN, 7 + BOTTOMMARGIN, 94 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\RegMozCtl.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON DISCARDABLE "res\\RegMozCtl.ico" +IDI_ICON2 ICON DISCARDABLE "MozillaBrowser.ico" +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\RegMozCtl.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.cpp b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.cpp new file mode 100644 index 00000000000..8cc7d680783 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.cpp @@ -0,0 +1,157 @@ +// RegMozCtlDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "RegMozCtl.h" +#include "RegMozCtlDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlDlg dialog + +CRegMozCtlDlg::CRegMozCtlDlg(CWnd* pParent /*=NULL*/) + : CDialog(CRegMozCtlDlg::IDD, pParent) +{ + //{{AFX_DATA_INIT(CRegMozCtlDlg) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); +} + +void CRegMozCtlDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CRegMozCtlDlg) + // NOTE: the ClassWizard will add DDX and DDV calls here + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CRegMozCtlDlg, CDialog) + //{{AFX_MSG_MAP(CRegMozCtlDlg) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_REGISTER, OnRegister) + ON_BN_CLICKED(IDC_UNREGISTER, OnUnregister) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlDlg message handlers + +BOOL CRegMozCtlDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + + // TODO: Add extra initialization here + + return TRUE; // return TRUE unless you set the focus to a control +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CRegMozCtlDlg::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CRegMozCtlDlg::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + +void CRegMozCtlDlg::OnRegister() +{ + RegisterMozillaControl(TRUE); +} + +void CRegMozCtlDlg::OnUnregister() +{ + RegisterMozillaControl(FALSE); +} + +void CRegMozCtlDlg::RegisterMozillaControl(BOOL bRegister) +{ + CFileFind cFind; + CString szFile; + CString szPath; + + CString szDir; + GetCurrentDirectory(1024, szDir.GetBuffer(1024)); + szDir.ReleaseBuffer(); + + CRegKey cKey; + if (cKey.Open(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\SharedDlls")) != ERROR_SUCCESS) + { + AfxMessageBox(_T("Can't open registry key \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\SharedDlls\"")); + return; + } + + // Iterate through directory registering each DLL as a shared DLL + BOOL bWorking = cFind.FindFile("*.dll"); + while (bWorking) + { + bWorking = cFind.FindNextFile(); + szFile = cFind.GetFileName(); + szPath = szDir + CString(_T("\\")) + szFile; + if (bRegister) + { + cKey.SetValue(1, szPath); + } + else + { + cKey.DeleteValue(szPath); + } + } + + // Now register the mozilla control + CString szMozCtl = szDir + CString(_T("\\npmozctl.dll")); + HINSTANCE hMod = LoadLibrary(szMozCtl); + if (hMod == NULL) + { + AfxMessageBox(_T("Can't find npmozctl.dll in current directory")); + } + FARPROC pfn = GetProcAddress(hMod, bRegister ? _T("DllRegisterServer") : _T("DllUnregisterServer")); + if (pfn) + { + pfn(); + } + FreeLibrary(hMod); + + AfxMessageBox(bRegister ? _T("Register completed") : _T("Unregister completed")); +} + diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.h b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.h new file mode 100644 index 00000000000..d40001dd16a --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/RegMozCtlDlg.h @@ -0,0 +1,53 @@ +// RegMozCtlDlg.h : header file +// + +#if !defined(AFX_REGMOZCTLDLG_H__C7C0A788_F424_11D2_A27B_000000000000__INCLUDED_) +#define AFX_REGMOZCTLDLG_H__C7C0A788_F424_11D2_A27B_000000000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +///////////////////////////////////////////////////////////////////////////// +// CRegMozCtlDlg dialog + +class CRegMozCtlDlg : public CDialog +{ +// Construction +public: + CRegMozCtlDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CRegMozCtlDlg) + enum { IDD = IDD_REGMOZCTL_DIALOG }; + // NOTE: the ClassWizard will add data members here + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CRegMozCtlDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CRegMozCtlDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnRegister(); + afx_msg void OnUnregister(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + void RegisterMozillaControl(BOOL bRegister); + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_REGMOZCTLDLG_H__C7C0A788_F424_11D2_A27B_000000000000__INCLUDED_) diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.cpp b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.cpp new file mode 100644 index 00000000000..aeedd8dd8eb --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// RegMozCtl.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.h b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.h new file mode 100644 index 00000000000..8d9fe79dc6d --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/StdAfx.h @@ -0,0 +1,29 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__C7C0A78A_F424_11D2_A27B_000000000000__INCLUDED_) +#define AFX_STDAFX_H__C7C0A78A_F424_11D2_A27B_000000000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes +#include // MFC support for Internet Explorer 4 Common Controls +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT +#include + + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__C7C0A78A_F424_11D2_A27B_000000000000__INCLUDED_) diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.ico b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.ico new file mode 100644 index 0000000000000000000000000000000000000000..7eef0bcbe6580a6f464d688906172c2d9de44262 GIT binary patch literal 1078 zcmc&zF>b>!3}jLb9s)T}@Kod(893@u8ajANzT`op9^o+)S?=nU(FD@%0s)Sg^oyC8{H z9myetc;MEP)59v(LMa~xK8Yu^jIR*H22uCFiq5%C{s7(PJi>o15i^bmX4(vPxWAio z9ryY#AU_jfnd047-@`)XzL?%iS$gQyFP{44kS9X)fN{{QoL~hO-&=q&20Zr*cxFAt PkaNE{wR~2C$NfnjhSXWT literal 0 HcmV?d00001 diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.rc2 b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.rc2 new file mode 100644 index 00000000000..57afbe6e741 --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/res/RegMozCtl.rc2 @@ -0,0 +1,13 @@ +// +// REGMOZCTL.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/resource.h b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/resource.h new file mode 100644 index 00000000000..6db16f56f0b --- /dev/null +++ b/mozilla/webshell/embed/ActiveX/tests/RegMozCtl/resource.h @@ -0,0 +1,20 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Developer Studio generated include file. +// Used by RegMozCtl.rc +// +#define IDD_REGMOZCTL_DIALOG 102 +#define IDR_MAINFRAME 128 +#define IDI_ICON2 130 +#define IDC_REGISTER 1001 +#define IDC_UNREGISTER 1002 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 131 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1002 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif