CXTPWebBrowserCtrl |
Post Reply |
Author | |
LEBRUNThierry
Newbie Joined: 07 March 2023 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 07 March 2023 at 4:18pm |
Hello,
I am new user for CodeJock Control. I want add a CXTPWebBrowserCtrl in a CDialogEx. i do that : in .h : CXTPWebBrowserCtrl m_wndWebBrowser; DECLARE_DISPATCH_MAP(); afx_msg BSTR OleGetAppPath(); in Cpp void CShadowDlg::DoDataExchange(CDataExchange* pDX)
{ CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, IDC_WEBBROWSER, m_wndWebBrowser); ... ... BEGIN_DISPATCH_MAP(CShadowDlg, CDialogEx) DISP_PROPERTY_EX(CShadowDlg, "appPath", OleGetAppPath, SetNotSupported, VT_BSTR) END_DISPATCH_MAP() ... ... BOOL CShadowDlg::OnInitDialog() { CDialogEx::OnInitDialog(); m_wndWebBrowser.SetExternal(GetIDispatch(FALSE)); ... ... BSTR CShadowDlg::OleGetAppPath() { WCHAR szAppPath[MAX_PATH + 1]; ::GetModuleFileNameW(NULL, szAppPath, _countof(szAppPath)); return SysAllocString(szAppPath); } but i have an Exception like that: Exception non gérée à 0x00007FFA5C8E49DE (ToolkitProEval2200vc170x64UD.dll) dans Shadow.exe : 0xC0000005 : Violation d'accès lors de la lecture de l'emplacement 0x0000000000000000. on DDX_Control(pDX, IDC_WEBBROWSER, m_wndWebBrowser); I thick i forget something.... but what ? thank Regards Thierry |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
|
Did you add the control to the dialog resource? If not, then IDC_WEBBROWSER does not exist.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |