Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:41:09+00:00 2026-05-29T06:41:09+00:00

I want to display all ascii characters( http://msdn.microsoft.com/en-us/library/Aa245273 ) including NULL in richEdit2 control

  • 0

I want to display all ascii characters(http://msdn.microsoft.com/en-us/library/Aa245273) including NULL in richEdit2 control of visual c++ but i don’t know how?

so please help help me how can i do this?

Actually i can show all character but when ASCII NUL is found from that richedit box doesn’t show any further character and i want to display all character my code is given below please help me

my code is given below

void CclientCheckDlg::ReadFileData()
{

    char *readfilename= configfilepath ;
    //FILE *fp=fopen(readfilename ,"r");
    std::ifstream openFile(readfilename,std::ios::out | std::ios::binary);
    //string s;
    unsigned char c;
    //std::string s;

    int i=0;
    do
    {
        c=openFile.get();
        if(c==EOF||i==999)
            break;

        unsignedCharPointer[i]=c;
        i++;
        printf("%c",c);
    }while(!openFile.eof());
    //fclose(fp);
    CString cs(unsignedCharPointer);
    OutputDebugString(cs);
//  configArrStr=s.c_str();
    int begin=m_rich_edit.GetTextLength();
    m_rich_edit.SetSel(begin,begin);
//  CA2CT ct(unsignedCharPointer);
    lpctstr=(LPCTSTR)unsignedCharPointer;
    OutputDebugString(lpctstr);
    m_rich_edit.ReplaceSel(cs);
}

so please can anyone help me,how can i display null character?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:41:09+00:00Added an answer on May 29, 2026 at 6:41 am
    //function to read binary file(Unicode) and write to richedit2
    
        void function()
        {   
        CFile cFile(TEXT("edit.moc"), CFile::modeRead);
           EDITSTREAM es={0};
    
            //HWND hwnd=getwin
           OutputDebugStringA("........... OnBnClickedButton1() ");
           es.pfnCallback= &EditStreamCallBack; 
           es.dwCookie = (DWORD) &cFile;
           m_richEdit.StreamIn(SF_TEXT, es);
           LRESULT result = SendMessageA(::GetDlgItem(hwnd, IDC_RICHEDIT21),EM_STREAMIN,SF_TEXT,(LPARAM)&es);
        }
    
    
        //callback function, declared in header file
        DWORD CALLBACK EditStreamCallBack(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
        {
            //MessageBoxA(L"hi...1");
             OutputDebugStringA("........... OnBnClickedButton1() 2");
           CFile* pFile = (CFile*) dwCookie;
    
           *pcb = pFile->Read(pbBuff, cb);
    
           return 0;
        }
    

    Thank you all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have db with this table (TableToDo): http://goo.gl/NlTEk I want display all records in
I want to use asp.net repeater control to display all threads that under same
I want to display all the possible enum values as Radio buttons. I am
I want to display all records from table of current autorized user in my
I'm working on Ubuntu.(Linux) I want to display all .php pages to .html in
I have a an array of observable collections and I want to display all
I have a following code , I want to display all the attributes of
I did hidden eclipse main menu. I want to display all item of eclipse
I want to display JQGrid with all column headers but without any data rows
I am using Lunece.net 2.0.5 version. I want to open and display all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.