Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPWebBrowserCtrl
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPWebBrowserCtrl

 Post Reply Post Reply
Author
Message
LEBRUNThierry View Drop Down
Newbie
Newbie


Joined: 07 March 2023
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote LEBRUNThierry Quote  Post ReplyReply Direct Link To This Post Topic: CXTPWebBrowserCtrl
    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



Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 891
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 21 August 2023 at 11:11am
Did you add the control to the dialog resource? If not, then IDC_WEBBROWSER does not exist.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.