-
March 1st, 2018, 12:56 PM
#1
riched20 in 64 bit app
I.m using a control CRichText in a dialog. My App was in 32 bit platform and i use riched20.dll for this.
When i upgrade the App from Visual Studio 2008 to Visual Studio 2017 and compile for a 64 bit platform,
the App fails when i create this dialog. Can someone help me? Perhaps i need another dll or is there any other problem.
Thanks you
PERE
-
March 1st, 2018, 04:18 PM
#2
Re: riched20 in 64 bit app
Victor Nijegorodov
-
March 5th, 2018, 03:23 AM
#3
Re: riched20 in 64 bit app
When i open my app, send a message and interrupt the execution.
Just in Create() function of the dialog that has the control.
-
March 5th, 2018, 03:25 AM
#4
Re: riched20 in 64 bit app
This are the lines in the Output window :
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\winfrm.cpp(1628) : AppMsg - Warning: no message line prompt for ID 0xE001.
El subproceso 0x19bc terminó con código 0 (0x0).
El subproceso 0x5c8 terminó con código 0 (0x0).
El subproceso 0x328 terminó con código 0 (0x0).
f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dlgcore.cpp(714) : AppMsg - Warning: CreateDlgControls failed during dialog init.
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\mfc140ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\include\afxwin2.inl
Line: 84
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
CivilEstudio.exe ha desencadenado un punto de interrupción.
-
March 5th, 2018, 03:27 AM
#5
Re: riched20 in 64 bit app
Originally Posted by pererm
When i open my app, send a message and interrupt the execution.
Just in Create() function of the dialog that has the control.
Could you show your code (together with error handling)?
Victor Nijegorodov
-
March 5th, 2018, 03:35 AM
#6
Re: riched20 in 64 bit app
dialaux.h :
Code:
#pragma once
#include "globalx.h"
#include "richtext.h"
class CDialAux : public CDialog
{
DECLARE_DYNAMIC(CDialAux)
public:
CDialAux(CWnd* pParent = NULL);
virtual ~CDialAux();
enum { IDD = IDD_AUX };
protected:
virtual void DoDataExchange(CDataExchange* pDX);
DECLARE_MESSAGE_MAP()
public:
CRichText m_RichTextBox_Renderer;
virtual BOOL Create();
};
dialaux.cpp :
Code:
// DialAux.cpp: archivo de implementación
//
#include "stdafx.h"
#include "DialAux.h"
// Cuadro de diálogo de CDialAux
IMPLEMENT_DYNAMIC(CDialAux, CDialog)
CDialAux::CDialAux(CWnd* pParent /*=NULL*/)
: CDialog(CDialAux::IDD, pParent)
{
}
CDialAux::~CDialAux()
{
}
void CDialAux::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_RICHTEXTCTRL1, m_RichTextBox_Renderer);
}
BEGIN_MESSAGE_MAP(CDialAux, CDialog)
END_MESSAGE_MAP()
// Controladores de mensajes de CDialAux
BOOL CDialAux::Create()
{
return CDialog::Create(CDialAux::IDD);
}
In Mainframe.h
Code:
CDialAux *m_pDialAux;
In Mainframe.cpp::OnCreate :
Code:
if(!m_pDialAux->GetSafeHwnd()) m_pDialAux->Create();
CRect rect;
m_pDialAux->GetWindowRect(&rect);
m_pDialAux->SetWindowPos(&wndTop,500,200,rect.right-rect.left,rect.bottom-rect.top,SWP_DRAWFRAME);
m_pDialAux->ShowWindow(SW_HIDE);
Last edited by 2kaud; March 5th, 2018 at 04:40 AM.
Reason: Added code tags
-
March 5th, 2018, 03:40 AM
#7
Re: riched20 in 64 bit app
I think there isn´t an errror handle in the message. Or i can´t see it
-
March 5th, 2018, 03:51 AM
#8
Re: riched20 in 64 bit app
is possible i need riched20W.dll for UNICODE format insert in the app?
-
March 5th, 2018, 04:14 AM
#9
Re: riched20 in 64 bit app
The message is :
Debug Assertion Failed!
Program: C:\Windows\system32\mfc140ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dbcore.cpp
Line:xxx
-
March 5th, 2018, 04:27 AM
#10
Re: riched20 in 64 bit app
Do you call the AfxInitRichEdit (or AfxInitRichEdit2) before using the rich edit control?
Victor Nijegorodov
-
March 5th, 2018, 04:41 AM
#11
Re: riched20 in 64 bit app
[When posting code, please use code tags. Go Advanced, select the formatted code and click '#']
Cheers!
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
March 5th, 2018, 04:45 AM
#12
Re: riched20 in 64 bit app
-
March 5th, 2018, 04:47 AM
#13
Re: riched20 in 64 bit app
I call AfxInitRichEdit2 in the constructor of the app. I suposse this is before calling InitInstance()
-
March 5th, 2018, 06:48 AM
#14
Re: riched20 in 64 bit app
Originally Posted by pererm
The message is :
Debug Assertion Failed!
Program: C:\Windows\system32\mfc140ud.dll
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dbcore.cpp
Line:xxx
Could you show the code (some lines) around this "Line:xxx"?
Victor Nijegorodov
-
March 5th, 2018, 07:02 AM
#15
Re: riched20 in 64 bit app
Originally Posted by pererm
...\atlmfc\src\mfc\dbcore.cpp
Are you using DB in your App? At least the assertion inside the dbcore.cpp points to it.
Maybe your problem is not in richedit but in DB-communications?
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|