dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 22

Thread: riched20 in 64 bit app

  1. #1
    Join Date
    Nov 2007
    Posts
    82

    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

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,229

    Re: riched20 in 64 bit app

    And how does it fail?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2007
    Posts
    82

    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.

  4. #4
    Join Date
    Nov 2007
    Posts
    82

    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.

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,229

    Re: riched20 in 64 bit app

    Quote Originally Posted by pererm View Post
    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

  6. #6
    Join Date
    Nov 2007
    Posts
    82

    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

  7. #7
    Join Date
    Nov 2007
    Posts
    82

    Re: riched20 in 64 bit app

    I think there isn´t an errror handle in the message. Or i can´t see it

  8. #8
    Join Date
    Nov 2007
    Posts
    82

    Re: riched20 in 64 bit app

    is possible i need riched20W.dll for UNICODE format insert in the app?

  9. #9
    Join Date
    Nov 2007
    Posts
    82

    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

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,229

    Re: riched20 in 64 bit app

    Do you call the AfxInitRichEdit (or AfxInitRichEdit2) before using the rich edit control?
    Victor Nijegorodov

  11. #11
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,414

    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++17 Compiler: Microsoft VS2017 (15.8.4)

  12. #12
    Join Date
    Nov 2007
    Posts
    82

    Re: riched20 in 64 bit app

    Ok

  13. #13
    Join Date
    Nov 2007
    Posts
    82

    Re: riched20 in 64 bit app

    I call AfxInitRichEdit2 in the constructor of the app. I suposse this is before calling InitInstance()

  14. #14
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,229

    Re: riched20 in 64 bit app

    Quote Originally Posted by pererm View Post
    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

  15. #15
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,229

    Re: riched20 in 64 bit app

    Quote Originally Posted by pererm View Post
    ...\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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)