L
Lucian Popescu
Hello,
I wonder how do you display a modal dialog? I tryed this:
.....
HWND hWnd;
CVisioApplication app;
if (!SUCCEEDED(GetApp(app)))
return VAORC_SUCCESS;
if(!SUCCEEDED(app.WindowHandle32((long*)&hWnd)))
return VAORC_SUCCESS;
COptionDialog optionDialog;
optionDialog.SetParent(CWnd::FromHandle(hWnd));
optionDialog.DoModal();
......
And I allways get a "Unhandled exception in Visio.exe (MFC42D.DLL):
0xC0000005: Access violation."
I just want to display a Option dialog.
/thanx in advance
/Lucian
ps here is the GetApp(app) function:
HRESULT TransferAddon::GetApp(CVisioApplication& vsoApp)
{
if (m_vsoApp.IsSet() || VAO_SUCCESS ==
vaoGetObjectWrap(m_vsoApp))
{
vsoApp = m_vsoApp;
return NOERROR;
}
return E_FAIL;
}
I wonder how do you display a modal dialog? I tryed this:
.....
HWND hWnd;
CVisioApplication app;
if (!SUCCEEDED(GetApp(app)))
return VAORC_SUCCESS;
if(!SUCCEEDED(app.WindowHandle32((long*)&hWnd)))
return VAORC_SUCCESS;
COptionDialog optionDialog;
optionDialog.SetParent(CWnd::FromHandle(hWnd));
optionDialog.DoModal();
......
And I allways get a "Unhandled exception in Visio.exe (MFC42D.DLL):
0xC0000005: Access violation."
I just want to display a Option dialog.
/thanx in advance
/Lucian
ps here is the GetApp(app) function:
HRESULT TransferAddon::GetApp(CVisioApplication& vsoApp)
{
if (m_vsoApp.IsSet() || VAO_SUCCESS ==
vaoGetObjectWrap(m_vsoApp))
{
vsoApp = m_vsoApp;
return NOERROR;
}
return E_FAIL;
}