如何用RichEdit实现类似于UE的16进制编辑器?
各位给点思路或者好的建议,
不使用第三方控件。

解决方案 »

  1.   

    http://www.codeguru.com/Cpp/controls/editctrl/article.php/c539/
      

  2.   

    不知道有没有用RichEdit实现的。
      

  3.   

    好像扩展RichEdit有点问题,使用传统的方法继承它并不好用。
      

  4.   

    为什么我将CRichEditCtrl控件放到Dialog上,程序就运行不起来啊?为什么?
      

  5.   

    BOOL CTest6App::InitInstance()
    {
    AfxEnableControlContainer(); AfxInitRichEdit();//加这句 // Standard initialization
    // If you are not using these features and wish to reduce the size
    //  of your final executable, you should remove from the following
    //  the specific initialization routines you do not need.#ifdef _AFXDLL
    Enable3dControls(); // Call this when using MFC in a shared DLL
    #else
    Enable3dControlsStatic(); // Call this when linking to MFC statically
    #endif
    // SetDialogBkColor(RGB(100,100,100));
    CTest6Dlg dlg;
    m_pMainWnd = &dlg;
    int nResponse = dlg.DoModal();
    if (nResponse == IDOK )
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    }
    else if (nResponse == IDCANCEL)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    }

    // Since the dialog has been closed, return FALSE so that we exit the
    //  application, rather than start the application's message pump.
    return FALSE;
    }
      

  6.   

    以前用VB+ RichTextBox做过一个 16进制查看器(没做编辑, 呵呵)思路也很简单的,每一行的数据分为三部分, 用三个 string保存现在用VC了, 当然不用 RichTextBox, 自已从 CWnd中画
      

  7.   

    我基于RichEdit扩展了一个HexEdit,但是,似乎写不了EN_CHANGE事件,因为我要在Change事件里面做输入控制。
      

  8.   

    添加EN_CHANGE消息响应函数在OnInitDialog中
    m_richedit1.SetEventMask(m_richedit1.GetEventMask() | ENM_CHANGE);
      

  9.   

    我不在Dialog中,我现在是另外写了一个类继承了CRichEditCtrl,所有的检查要在这个类中完成,change事件要在自身实现。
      

  10.   

    to: lixiaosan(小三) 
    可否直接和你联系?我发了msg给你了。希望你能够给我一点帮助。
      

  11.   

    参考:http://www.pediy.com/code/Editors/16edit/16edit.zip