I'm not sure what is wrong with my activex control, "Microsoft Web Browser". I add the activex control to my dialog project with no problem. Then I add a member variable to my main dialog class for this activex control. In Visual Studio .net whenever you add a variable for the control, a wrapper class is automatically generated. I believe my problem lies in this automatically generated class. I'm not sure if it's my copy of visual studio .net (2002) but I believe the code being generated for this class is wrong. I have also tried this in VS 6.0 and everything worked fine, and the wrapper class looked completely different. What could be wrong. I haven't been programming in C++ for that long so little things sometimes throw me off, but this time I believe it's a problem with VS .net or my installation of it.
Please Help
This is the wrapper code generated:
<br />
#pragma once<br />
<br />
<br />
<br />
<br />
class CExplorer1 : public CWnd<br />
{<br />
protected:<br />
DECLARE_DYNCREATE(CExplorer1)<br />
public:<br />
CLSID const& GetClsid()<br />
{<br />
static CLSID const clsid<br />
= { 0x8856F961, 0x340A, 0x11D0, { 0xA9, 0x6B, 0x0, 0xC0, 0x4F, 0xD7, 0x5, 0xA2 } };<br />
return clsid;<br />
}<br />
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,<br />
const RECT& rect, CWnd* pParentWnd, UINT nID, <br />
CCreateContext* pContext = NULL)<br />
{ <br />
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); <br />
}<br />
<br />
BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, <br />
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,<br />
BSTR bstrLicKey = NULL)<br />
{ <br />
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,<br />
pPersist, bStorage, bstrLicKey); <br />
}<br />
<br />
public:<br />
enum<br />
{<br />
CSC_UPDATECOMMANDS = -1,<br />
CSC_NAVIGATEFORWARD = 1,<br />
CSC_NAVIGATEBACK = 2<br />
}CommandStateChangeConstants;<br />
enum<br />
{<br />
OLECMDID_OPEN = 1,<br />
OLECMDID_NEW = 2,<br />
OLECMDID_SAVE = 3,<br />
OLECMDID_SAVEAS = 4,<br />
OLECMDID_SAVECOPYAS = 5,<br />
OLECMDID_PRINT = 6,<br />
OLECMDID_PRINTPREVIEW = 7,<br />
OLECMDID_PAGESETUP = 8,<br />
OLECMDID_SPELL = 9,<br />
OLECMDID_PROPERTIES = 10,<br />
OLECMDID_CUT = 11,<br />
OLECMDID_COPY = 12,<br />
OLECMDID_PASTE = 13,<br />
OLECMDID_PASTESPECIAL = 14,<br />
OLECMDID_UNDO = 15,<br />
OLECMDID_REDO = 16,<br />
OLECMDID_SELECTALL = 17,<br />
OLECMDID_CLEARSELECTION = 18,<br />
OLECMDID_ZOOM = 19,<br />
OLECMDID_GETZOOMRANGE = 20,<br />
OLECMDID_UPDATECOMMANDS = 21,<br />
OLECMDID_REFRESH = 22,<br />
OLECMDID_STOP = 23,<br />
OLECMDID_HIDETOOLBARS = 24,<br />
OLECMDID_SETPROGRESSMAX = 25,<br />
OLECMDID_SETPROGRESSPOS = 26,<br />
OLECMDID_SETPROGRESSTEXT = 27,<br />
OLECMDID_SETTITLE = 28,<br />
OLECMDID_SETDOWNLOADSTATE = 29,<br />
OLECMDID_STOPDOWNLOAD = 30,<br />
OLECMDID_ONTOOLBARACTIVATED = 31,<br />
OLECMDID_FIND = 32,<br />
OLECMDID_DELETE = 33,<br />
OLECMDID_HTTPEQUIV = 34,<br />
OLECMDID_HTTPEQUIV_DONE = 35,<br />
OLECMDID_ENABLE_INTERACTION = 36,<br />
OLECMDID_ONUNLOAD = 37,<br />
OLECMDID_PROPERTYBAG2 = 38,<br />
OLECMDID_PREREFRESH = 39,<br />
OLECMDID_SHOWSCRIPTERROR = 40,<br />
OLECMDID_SHOWMESSAGE = 41,<br />
OLECMDID_SHOWFIND = 42,<br />
OLECMDID_SHOWPAGESETUP = 43,<br />
OLECMDID_SHOWPRINT = 44,<br />
OLECMDID_CLOSE = 45,<br />
OLECMDID_ALLOWUILESSSAVEAS = 46,<br />
OLECMDID_DONTDOWNLOADCSS = 47,<br />
OLECMDID_UPDATEPAGESTATUS = 48,<br />
OLECMDID_PRINT2 = 49,<br />
OLECMDID_PRINTPREVIEW2 = 50,<br />
OLECMDID_SETPRINTTEMPLATE = 51,<br />
OLECMDID_GETPRINTTEMPLATE = 52<br />
}OLECMDID;<br />
enum<br />
{<br />
OLECMDF_SUPPORTED = 1,<br />
OLECMDF_ENABLED = 2,<br />
OLECMDF_LATCHED = 4,<br />
OLECMDF_NINCHED = 8,<br />
OLECMDF_INVISIBLE = 16,<br />
OLECMDF_DEFHIDEONCTXTMENU = 32<br />
}OLECMDF;<br />
enum<br />
{<br />
OLECMDEXECOPT_DODEFAULT = 0,<br />
OLECMDEXECOPT_PROMPTUSER = 1,<br />
OLECMDEXECOPT_DONTPROMPTUSER = 2,<br />
OLECMDEXECOPT_SHOWHELP = 3<br />
}OLECMDEXECOPT;<br />
enum<br />
{<br />
READYSTATE_UNINITIALIZED = 0,<br />
READYSTATE_LOADING = 1,<br />
READYSTATE_LOADED = 2,<br />
READYSTATE_INTERACTIVE = 3,<br />
READYSTATE_COMPLETE = 4<br />
}tagREADYSTATE;<br />
enum<br />
{<br />
secureLockIconUnsecure = 0,<br />
secureLockIconMixed = 1,<br />
secureLockIconSecureUnknownBits = 2,<br />
secureLockIconSecure40Bit = 3,<br />
secureLockIconSecure56Bit = 4,<br />
secureLockIconSecureFortezza = 5,<br />
secureLockIconSecure128Bit = 6<br />
}SecureLockIconConstants;<br />
enum<br />
{<br />
SWC_EXPLORER = 0,<br />
SWC_BROWSER = 1,<br />
SWC_3RDPARTY = 2,<br />
SWC_CALLBACK = 4<br />
}ShellWindowTypeConstants;<br />
enum<br />
{<br />
SWFO_NEEDDISPATCH = 1,<br />
SWFO_INCLUDEPENDING = 2,<br />
SWFO_COOKIEPASSED = 4<br />
}ShellWindowFindWindowOptions;<br />
<br />
<br />
public:<br />
<br />
<br />
<br />
};<br />
|