Print Page | Close Window

CXTPWebBrowserCtrl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=24369
Printed Date: 03 December 2024 at 12:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPWebBrowserCtrl
Posted By: LEBRUNThierry
Subject: CXTPWebBrowserCtrl
Date 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






Replies:
Posted By: rdhd
Date Posted: 21 August 2023 at 11:11am
Did you add the control to the dialog resource? If not, then IDC_WEBBROWSER does not exist.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net