Added controllerflag selection
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "DataModelInstance.h"
|
#include "DataModelInstance.h"
|
||||||
#include <G3DAll.h>
|
|
||||||
|
|
||||||
class Application;
|
class Application;
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ bool IEBrowser::navigateSyncURL(wchar_t* url)
|
|||||||
MSG messages;
|
MSG messages;
|
||||||
if (webBrowser)
|
if (webBrowser)
|
||||||
{
|
{
|
||||||
|
|
||||||
webBrowser->Navigate(url,0,0,0,0);
|
webBrowser->Navigate(url,0,0,0,0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
32
ax.cpp
32
ax.cpp
@@ -1,10 +1,7 @@
|
|||||||
// AX.CPP
|
// AX.CPP
|
||||||
#include <windows.h>
|
|
||||||
#include <comdef.h>
|
|
||||||
#include <exdisp.h>
|
|
||||||
#include <oledlg.h>
|
|
||||||
#include "ax.h"
|
#include "ax.h"
|
||||||
|
#include "AudioPlayer.h"
|
||||||
|
#include "Enum.h"
|
||||||
|
|
||||||
#pragma warning (disable: 4311)
|
#pragma warning (disable: 4311)
|
||||||
#pragma warning (disable: 4312)
|
#pragma warning (disable: 4312)
|
||||||
@@ -106,6 +103,8 @@ STDMETHODIMP AXClientSite :: FilterDataObject( IDataObject *pDO, IDataObject **p
|
|||||||
STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
||||||
{
|
{
|
||||||
*ppvObject = 0;
|
*ppvObject = 0;
|
||||||
|
// if (iid == IID_IOleInPlaceSite)
|
||||||
|
// *ppvObject = (IOleInPlaceSite*)this;
|
||||||
if (iid == IID_IOleClientSite)
|
if (iid == IID_IOleClientSite)
|
||||||
*ppvObject = (IOleClientSite*)this;
|
*ppvObject = (IOleClientSite*)this;
|
||||||
if (iid == IID_IUnknown)
|
if (iid == IID_IUnknown)
|
||||||
@@ -114,7 +113,7 @@ STDMETHODIMP AXClientSite :: QueryInterface(REFIID iid,void**ppvObject)
|
|||||||
*ppvObject = (IAdviseSink*)this;
|
*ppvObject = (IAdviseSink*)this;
|
||||||
if (iid == IID_IDispatch)
|
if (iid == IID_IDispatch)
|
||||||
*ppvObject = (IDispatch*)this;
|
*ppvObject = (IDispatch*)this;
|
||||||
if (ExternalPlace == false)
|
//if (ExternalPlace == false)
|
||||||
{
|
{
|
||||||
if (iid == IID_IOleInPlaceSite)
|
if (iid == IID_IOleInPlaceSite)
|
||||||
*ppvObject = (IOleInPlaceSite*)this;
|
*ppvObject = (IOleInPlaceSite*)this;
|
||||||
@@ -517,6 +516,27 @@ HRESULT _stdcall AXClientSite :: Invoke(
|
|||||||
{
|
{
|
||||||
MessageBox(NULL, "BOOP", "Boopity boop",MB_OK);
|
MessageBox(NULL, "BOOP", "Boopity boop",MB_OK);
|
||||||
}
|
}
|
||||||
|
else if (m_lastExternalName==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<PVInstance*>(g_selectedInstances.at(i)))
|
||||||
|
{
|
||||||
|
ding = true;
|
||||||
|
part->controller = cont;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ding)
|
||||||
|
AudioPlayer::playSound(dingSound);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
|||||||
2
ax.h
2
ax.h
@@ -1,4 +1,6 @@
|
|||||||
// AX.H
|
// AX.H
|
||||||
|
#pragma once
|
||||||
|
#include "Globals.h"
|
||||||
#include <mshtmhst.h>
|
#include <mshtmhst.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<body style="background-color: ButtonFace; margin: 0; padding: 5px; overflow: hidden; border:0;">
|
<body style="background-color: ButtonFace; margin: 0; padding: 5px; overflow: hidden; border:0;">
|
||||||
<img src="../images/Controller1Tool.png" onclick="SetController(1)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
<img src="../images/Controller1Tool.png" onclick="window.external.SetController(1)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||||
<img src="../images/Controller2Tool.png" onclick="Insert(2)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
<img src="../images/Controller2Tool.png" onclick="window.external.SetController(2)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||||
<img src="../images/ControllerAI1Tool.png" onclick="SetController(3)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
<img src="../images/ControllerAI1Tool.png" onclick="window.external.SetController(5)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||||
<img src="../images/ControllerAI2Tool.png" onclick="SetController(4)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
<img src="../images/ControllerAI2Tool.png" onclick="window.external.SetController(623423434234)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||||
<img src="../images/ControllerNoneTool.png" onclick="SetController(0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
<img src="../images/ControllerNoneTool.png" onclick="window.external.SetController(0)" onmousedown="toolOvr(this)" onmouseup="toolOut(this)"/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
13
main.cpp
13
main.cpp
@@ -175,6 +175,19 @@ LRESULT CALLBACK G3DProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
try{
|
try{
|
||||||
hresult = OleInitialize(NULL);
|
hresult = OleInitialize(NULL);
|
||||||
|
|
||||||
|
HRESULT hr;
|
||||||
|
/* 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())
|
if (!AXRegister())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user