diff --git a/Application.cpp b/Application.cpp index c831a4f..e41f7df 100644 --- a/Application.cpp +++ b/Application.cpp @@ -20,7 +20,6 @@ #include #include "ax.h" #include -#include "IEBrowser.h" #include "PropertyWindow.h" #include #include "StringFunctions.h" @@ -114,7 +113,7 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti Win32Window* window = Win32Window::create(_settings.window,_hwndRenderer); ShowWindow(_hwndRenderer, SW_SHOW); ShowWindow(_hWndMain, SW_SHOW); - + quit=false; rightButtonHolding=false; mouseOnScreen=false; @@ -135,10 +134,23 @@ Application::Application(HWND parentWindow) : _propWindow(NULL) { //: GApp(setti SetWindowLongPtr(_hWndMain,GWL_USERDATA,(LONG)this); SetWindowLongPtr(_hwndRenderer,GWL_USERDATA,(LONG)this); _propWindow = new PropertyWindow(0, 0, 200, 640, hThisInstance); - IEBrowser* webBrowser = new IEBrowser(_hwndToolbox); - webBrowser->navigateSyncURL(L"http://androdome.com/res/ClientToolbox.php"); + webBrowser = new IEBrowser(_hwndToolbox); + + SetWindowLongPtr(_hwndToolbox,GWL_USERDATA+1,(LONG)webBrowser); + //webBrowser->navigateSyncURL(L"http://androdome.com/res/ClientToolbox.php"); + //navigateToolbox(GetFileInPath("/content/page/controller.html")); + navigateToolbox(GetFileInPath("/content/page/surface.html")); + } +void Application::navigateToolbox(std::string path) +{ + int len = path.size() + 1; + wchar_t * nstr = new wchar_t[len]; + MultiByteToWideChar(0, 0, path.c_str(), len, nstr, len); + webBrowser->navigateSyncURL(nstr); + delete[] nstr; +} void Application::deleteInstance() { @@ -333,7 +345,7 @@ void eject(PartInstance * colliding, PartInstance * collider) if(colliding == collider || !colliding->canCollide || !collider->canCollide) return; if(G3D::CollisionDetection::fixedSolidBoxIntersectsFixedSolidBox(collider->getBox(), colliding->getBox())) - collider->setVelocity(collider->getVelocity().reflectionDirection(colliding->cFrame.upVector())/1.3); + collider->setVelocity(collider->getVelocity().reflectionDirection(colliding->cFrame.upVector())/1.3F); } @@ -512,7 +524,7 @@ int Application::getMode() void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, LightingParameters lighting, Vector3 size, Vector3 pos, CoordinateFrame c) { - + rd->disableLighting(); Color3 outline = Color3::cyan();//Color3(0.098F,0.6F,1.0F); float offsetSize = 0.05F; //X @@ -534,8 +546,6 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti if(_mode == ARROWS) { - rd->setLight(0, NULL); - rd->setAmbientLightColor(Color3(1,1,1)); AABox box; c.toWorldSpace(Box(from, to)).getBounds(box); @@ -556,14 +566,10 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti - rd->setAmbientLightColor(lighting.ambient); - rd->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor)); } else if(_mode == RESIZE) { Color3 sphereColor = outline; - rd->setLight(0, NULL); - rd->setAmbientLightColor(Color3(1,1,1)); Vector3 gamepoint = pos; Vector3 camerapoint = rd->getCameraToWorldMatrix().translation; float distance = pow(pow((double)gamepoint.x - (double)camerapoint.x, 2) + pow((double)gamepoint.y - (double)camerapoint.y, 2) + pow((double)gamepoint.z - (double)camerapoint.z, 2), 0.5); @@ -573,25 +579,23 @@ void Application::drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, Lighti float multiplier = distance * 0.025F/2; if(multiplier < 0.25F) multiplier = 0.25F; - Vector3 position = pos + (c.lookVector()*((size.z/2)+1)); + Vector3 position = pos + (c.lookVector()*((size.z)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); - position = pos - (c.lookVector()*((size.z/2)+1)); + position = pos - (c.lookVector()*((size.z)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); - position = pos + (c.rightVector()*((size.x/2)+1)); + position = pos + (c.rightVector()*((size.x)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); - position = pos - (c.rightVector()*((size.x/2)+1)); + position = pos - (c.rightVector()*((size.x)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); - position = pos + (c.upVector()*((size.y/2)+1)); + position = pos + (c.upVector()*((size.y)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); - position = pos - (c.upVector()*((size.y/2)+1)); + position = pos - (c.upVector()*((size.y)+1)); Draw::sphere(Sphere(position, multiplier), rd, sphereColor, Color4::clear()); } - rd->setAmbientLightColor(lighting.ambient); - rd->setLight(0, GLight::directional(lighting.lightDirection, lighting.lightColor)); } - + rd->enableLighting(); } void Application::exitApplication() diff --git a/Application.h b/Application.h index 5835f21..2584550 100644 --- a/Application.h +++ b/Application.h @@ -4,6 +4,7 @@ #include "TextButtonInstance.h" #include "ImageButtonInstance.h" #include "CameraController.h" +#include "IEBrowser.h" //#include "GuiRoot.h" class TextButtonInstance; @@ -25,6 +26,7 @@ class Application { // : public GApp { virtual void onUserInput(UserInput* ui); virtual void onCleanup(); void clearInstances(); + void navigateToolbox(std::string); PartInstance* makePart(); void drawButtons(RenderDevice* rd); void drawOutline(Vector3 from, Vector3 to, RenderDevice* rd, LightingParameters lighting, Vector3 size, Vector3 pos, CoordinateFrame c); @@ -72,6 +74,7 @@ class Application { // : public GApp { int _mode; GAppSettings _settings; double lightProjX, lightProjY, lightProjNear, lightProjFar; + IEBrowser* webBrowser; protected: Stopwatch m_graphicsWatch; Stopwatch m_logicWatch; diff --git a/Globals.h b/Globals.h index b3dba1c..e13f6dd 100644 --- a/Globals.h +++ b/Globals.h @@ -1,6 +1,6 @@ #pragma once #include "DataModelInstance.h" -#include + class Application; diff --git a/GuiRoot.cpp b/GuiRoot.cpp index 4ad9e5a..7e1fe2a 100644 --- a/GuiRoot.cpp +++ b/GuiRoot.cpp @@ -37,6 +37,7 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) g_fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt")); g_fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt")); + //Bottom Left TextButtonInstance* button = makeTextButton(); button->boxBegin = Vector2(0, -24); button->boxEnd = Vector2(80, 0); @@ -48,6 +49,9 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->title = "Hopper"; button->fontLocationRelativeTo = Vector2(10, 3); button->setAllColorsSame(); + button->boxOutlineColorOvr = Color3(0,255,255); + button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F); + button = makeTextButton(); button->boxBegin = Vector2(0, -48); @@ -60,6 +64,9 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->title = "Controller"; button->fontLocationRelativeTo = Vector2(10, 3); button->setAllColorsSame(); + button->boxOutlineColorOvr = Color3(0,255,255); + button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F); + button = makeTextButton(); button->boxBegin = Vector2(0, -72); @@ -72,6 +79,8 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->title = "Color"; button->fontLocationRelativeTo = Vector2(10, 3); button->setAllColorsSame(); + button->boxOutlineColorOvr = Color3(0,255,255); + button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F); button = makeTextButton(); button->boxBegin = Vector2(0, -96); @@ -84,6 +93,8 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->title = "Surface"; button->fontLocationRelativeTo = Vector2(10, 3); button->setAllColorsSame(); + button->boxOutlineColorOvr = Color3(0,255,255); + button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F); button = makeTextButton(); button->boxBegin = Vector2(0, -120); @@ -92,11 +103,14 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->setParent(this); button->font = g_fntlighttrek; button->textColor = Color3(0,255,255); - button->boxOutlineColor = Color3(0,255,255); button->title = "Model"; + button->selected = true; button->fontLocationRelativeTo = Vector2(10, 3); button->setAllColorsSame(); + button->boxOutlineColorOvr = Color3(0,255,255); + button->boxColorDn = Color4(button->boxColor.r,button->boxColor.g,button->boxColor.b, 0.2F); + //Top bar button = makeTextButton(); button->boxBegin = Vector2(0, 0); button->boxEnd = Vector2(125, 25); @@ -109,6 +123,7 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->textSize = 16; button->fontLocationRelativeTo = Vector2(10, 0); button->setAllColorsSame(); + button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F); button = makeTextButton(); button->boxBegin = Vector2(125, 0); @@ -122,6 +137,7 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->textSize = 16; button->fontLocationRelativeTo = Vector2(10, 0); button->setAllColorsSame(); + button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F); button = makeTextButton(); button->boxBegin = Vector2(250, 0); @@ -135,6 +151,7 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->textSize = 16; button->fontLocationRelativeTo = Vector2(10, 0); button->setAllColorsSame(); + button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F); button = makeTextButton(); button->boxBegin = Vector2(375, 0); @@ -148,6 +165,7 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->textSize = 16; button->fontLocationRelativeTo = Vector2(10, 0); button->setAllColorsSame(); + button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F); button = makeTextButton(); button->boxBegin = Vector2(500, 0); @@ -161,9 +179,10 @@ GuiRoot::GuiRoot() : _message(""), _messageTime(0) button->textSize = 16; button->fontLocationRelativeTo = Vector2(10, 0); button->setAllColorsSame(); + button->boxColorOvr = Color4(0.6F,0.6F,0.6F,0.4F); - + //Menu button = makeTextButton(); button->boxBegin = Vector2(0,215); button->boxEnd = Vector2(80,235); @@ -382,7 +401,7 @@ void GuiRoot::drawButtons(RenderDevice* rd) { rd->pushState(); rd->beforePrimitive(); - this->render(rd); + //this->render(rd); rd->afterPrimitive(); rd->popState(); } @@ -422,7 +441,7 @@ void GuiRoot::renderGUI(G3D::RenderDevice* rd, double fps) g_fntlighttrek->draw2D(rd,"MENU", Vector2(10,332), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); - drawButtons(rd); + //drawButtons(rd); if(System::time() - 3 < _messageTime) { g_fntdominant->draw2D(rd, _message, Vector2((rd->getWidth()/2)-(g_fntdominant->get2DStringBounds(_message, 20).x/2),(rd->getHeight()/2)-(g_fntdominant->get2DStringBounds(_message, 20).y/2)), 20, Color3::yellow(), Color3::black()); diff --git a/IEBrowser.cpp b/IEBrowser.cpp index d3848dd..b560aea 100644 --- a/IEBrowser.cpp +++ b/IEBrowser.cpp @@ -7,11 +7,54 @@ #include "IEBrowser.h" #include "Globals.h" +#pragma once #include "ax.h" -void IEBrowser::Boop(char* test) +HRESULT IEBrowser::doExternal(std::wstring funcName, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pDispParams, + VARIANT FAR* pVarResult, + EXCEPINFO FAR* pExcepInfo, + unsigned int FAR* puArgErr) { - // External functions may end up here in the future + if (funcName==L"Insert") + { + + MessageBoxW(NULL, pDispParams->rgvarg->bstrVal,L"Add insert here...",MB_OK); + return S_OK; + } + else if (funcName==L"ToggleHopperBin") + { + MessageBox(NULL, "BOOP", "Boopity boop",MB_OK); + } + else if (funcName==L"SetController") + { + bool ding = false; + //int len = SysStringLen(pDispParams->rgvarg->bstrVal)+1; + //char * args = new char[len]; + //WideCharToMultiByte(CP_ACP, 0, pDispParams->rgvarg->bstrVal, len, args, len, NULL, (LPBOOL)TRUE); + if(pDispParams->rgvarg->intVal < 0 || pDispParams->rgvarg->intVal > 7) + return S_OK; + Enum::Controller::Value cont = (Enum::Controller::Value)pDispParams->rgvarg->intVal; + for(size_t i = 0; i < g_selectedInstances.size(); i++) + { + if(PVInstance* part = dynamic_cast(g_selectedInstances.at(i))) + { + ding = true; + part->controller = cont; + } + } + if(ding) + AudioPlayer::playSound(dingSound); + return S_OK; + } + else + { + return E_NOTIMPL; + } } IEBrowser::IEBrowser(HWND attachHWnd) { @@ -39,9 +82,10 @@ IEBrowser::~IEBrowser(void) { bool IEBrowser::navigateSyncURL(wchar_t* url) { - MSG messages; + //MSG messages; if (webBrowser) { + webBrowser->Navigate(url,0,0,0,0); } else diff --git a/IEBrowser.h b/IEBrowser.h index 1bef0a7..15b3264 100644 --- a/IEBrowser.h +++ b/IEBrowser.h @@ -1,16 +1,27 @@ //#include "WindowFunctions.h" #pragma once +#include "Globals.h" +#pragma once #include #include #include #include "IEDispatcher.h" +#include "AudioPlayer.h" class IEBrowser { public: IEBrowser(HWND attachHWnd); ~IEBrowser(void); bool navigateSyncURL(wchar_t* url); - void Boop(char* test); + HRESULT doExternal(std::wstring funcName, + DISPID dispIdMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pDispParams, + VARIANT FAR* pVarResult, + EXCEPINFO FAR* pExcepInfo, + unsigned int FAR* puArgErr); private: IWebBrowser2* webBrowser; HWND hwnd; diff --git a/TextButtonInstance.cpp b/TextButtonInstance.cpp index 3ac8ec9..1529128 100644 --- a/TextButtonInstance.cpp +++ b/TextButtonInstance.cpp @@ -98,12 +98,7 @@ void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseD Draw::box(Box(point1, point2), rd, boxColorDn, boxOutlineColorDn); font->draw2D(rd, title, RelativeTo, textSize, textColorDn, textOutlineColorDn); } - else if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y)) - { - Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr); - font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr); - } - else if(selected) + else if(selected || mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y)) { Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr); font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr); diff --git a/ax.cpp b/ax.cpp index b8ce2e1..a8f6eba 100644 --- a/ax.cpp +++ b/ax.cpp @@ -1,10 +1,7 @@ // AX.CPP -#include -#include -#include -#include #include "ax.h" - +#include "AudioPlayer.h" +#include "Enum.h" #pragma warning (disable: 4311) #pragma warning (disable: 4312) @@ -106,6 +103,8 @@ STDMETHODIMP AXClientSite :: FilterDataObject( IDataObject *pDO, IDataObject **p STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject) { *ppvObject = 0; + // if (iid == IID_IOleInPlaceSite) + // *ppvObject = (IOleInPlaceSite*)this; if (iid == IID_IOleClientSite) *ppvObject = (IOleClientSite*)this; if (iid == IID_IUnknown) @@ -114,7 +113,7 @@ STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject) *ppvObject = (IAdviseSink*)this; if (iid == IID_IDispatch) *ppvObject = (IDispatch*)this; - if (ExternalPlace == false) + //if (ExternalPlace == false) { if (iid == IID_IOleInPlaceSite) *ppvObject = (IOleInPlaceSite*)this; @@ -506,22 +505,10 @@ HRESULT _stdcall AXClientSite :: Invoke( EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) { - - if (m_lastExternalName==L"Insert") - { - - MessageBoxW(NULL, pDispParams->rgvarg->bstrVal,L"Add insert here...",MB_OK); - return S_OK; - } - else if (m_lastExternalName==L"Boop") - { - MessageBox(NULL, "BOOP", "Boopity boop",MB_OK); - } - else - { - return E_NOTIMPL; - } - return S_OK; + IEBrowser * browser = (IEBrowser *)GetWindowLongPtr(Window,GWL_USERDATA+1); + return browser->doExternal(m_lastExternalName,dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + //return S_OK; } diff --git a/ax.h b/ax.h index 6f56add..2fcce49 100644 --- a/ax.h +++ b/ax.h @@ -1,6 +1,10 @@ // AX.H +#pragma once +#include "Globals.h" #include #include +#pragma once +#include "IEBrowser.h" // messages #define AX_QUERYINTERFACE (WM_USER + 1) @@ -38,7 +42,6 @@ class AXClientSite : bool CalledCanInPlace; class AX* ax; - // MyClientSite Methods AXClientSite(); virtual ~AXClientSite(); diff --git a/content/images/BumpTool.png b/content/images/BumpTool.png new file mode 100644 index 0000000..392ba46 Binary files /dev/null and b/content/images/BumpTool.png differ diff --git a/content/images/BumpTool_dn.png b/content/images/BumpTool_dn.png new file mode 100644 index 0000000..64c756a Binary files /dev/null and b/content/images/BumpTool_dn.png differ diff --git a/content/images/Clone.png b/content/images/Clone.png new file mode 100644 index 0000000..31915a9 Binary files /dev/null and b/content/images/Clone.png differ diff --git a/content/images/GameTool.png b/content/images/GameTool.png new file mode 100644 index 0000000..6c6fce2 Binary files /dev/null and b/content/images/GameTool.png differ diff --git a/content/images/GlueTool.png b/content/images/GlueTool.png new file mode 100644 index 0000000..abc10a9 Binary files /dev/null and b/content/images/GlueTool.png differ diff --git a/content/images/GlueTool_dn.png b/content/images/GlueTool_dn.png new file mode 100644 index 0000000..76ff83a Binary files /dev/null and b/content/images/GlueTool_dn.png differ diff --git a/content/images/Grab.png b/content/images/Grab.png new file mode 100644 index 0000000..adea8d6 Binary files /dev/null and b/content/images/Grab.png differ diff --git a/content/images/Hammer.png b/content/images/Hammer.png new file mode 100644 index 0000000..c07b5af Binary files /dev/null and b/content/images/Hammer.png differ diff --git a/content/images/Laser.png b/content/images/Laser.png new file mode 100644 index 0000000..24e41d9 Binary files /dev/null and b/content/images/Laser.png differ diff --git a/content/images/RightMotorFastTool.png b/content/images/RightMotorFastTool.png new file mode 100644 index 0000000..3e4a779 Binary files /dev/null and b/content/images/RightMotorFastTool.png differ diff --git a/content/images/RightMotorFastTool_dn.png b/content/images/RightMotorFastTool_dn.png new file mode 100644 index 0000000..6dd9302 Binary files /dev/null and b/content/images/RightMotorFastTool_dn.png differ diff --git a/content/images/RightMotorTool.png b/content/images/RightMotorTool.png new file mode 100644 index 0000000..a61a195 Binary files /dev/null and b/content/images/RightMotorTool.png differ diff --git a/content/images/RightMotorTool_dn.png b/content/images/RightMotorTool_dn.png new file mode 100644 index 0000000..916158e Binary files /dev/null and b/content/images/RightMotorTool_dn.png differ diff --git a/content/images/Rocket.png b/content/images/Rocket.png new file mode 100644 index 0000000..32a3191 Binary files /dev/null and b/content/images/Rocket.png differ diff --git a/content/images/Slingshot.png b/content/images/Slingshot.png new file mode 100644 index 0000000..6ecb734 Binary files /dev/null and b/content/images/Slingshot.png differ diff --git a/content/images/SmoothTool.png b/content/images/SmoothTool.png new file mode 100644 index 0000000..114a6e7 Binary files /dev/null and b/content/images/SmoothTool.png differ diff --git a/content/images/SmoothTool_dn.png b/content/images/SmoothTool_dn.png new file mode 100644 index 0000000..17806de Binary files /dev/null and b/content/images/SmoothTool_dn.png differ diff --git a/content/page/color.html b/content/page/color.html new file mode 100644 index 0000000..8858292 Binary files /dev/null and b/content/page/color.html differ diff --git a/content/page/controller.html b/content/page/controller.html new file mode 100644 index 0000000..3feb4d6 --- /dev/null +++ b/content/page/controller.html @@ -0,0 +1,21 @@ + + + + + + + + + + \ No newline at end of file diff --git a/content/page/hopper.html b/content/page/hopper.html new file mode 100644 index 0000000..d1e1ea2 --- /dev/null +++ b/content/page/hopper.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/content/page/surface.html b/content/page/surface.html new file mode 100644 index 0000000..f1652d1 --- /dev/null +++ b/content/page/surface.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/main.cpp b/main.cpp index 6b516bf..51058b1 100644 --- a/main.cpp +++ b/main.cpp @@ -175,6 +175,18 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) int main(int argc, char** argv) { try{ hresult = OleInitialize(NULL); + +/* IInternetSecurityManager *pSecurityMgr; + IInternetZoneManager *pZoneMgr; + LPCWSTR site1 = SysAllocString(L"http://www.androdome.com"); + + hr = CoCreateInstance(CLSID_InternetSecurityManager, NULL, CLSCTX_INPROC_SERVER, IID_IInternetSecurityManager, (void**)&pSecurityMgr); + + pSecurityMgr->SetZoneMapping((DWORD)2, site1, (DWORD)0); // 2 = Trusted Site, site1 is the URL to add, and 0 is to create the entry. +*/ + + + if (!AXRegister()) return 0;