Solved

CRichEditCtrl with grid

Posted on 2000-03-07
5
403 Views
Last Modified: 2013-11-20
My user requested me to draw grid on the CRichEditCtrl control and any typed character will be display within the grid, would it possible? How to do that?

Thanks.
0
Comment
Question by:limbe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:gelbert
ID: 2592541
If you are really have to draw grid on CRichEdit (can you just use grid and insert CRichEdit ctrls into cells?) then you would need to derive from CRichEditView and overwrite OnDraw() to
paint lines and paint cursor in correct cell.
0
 
LVL 8

Accepted Solution

by:
gelbert earned 100 total points
ID: 2592559
0
 

Author Comment

by:limbe
ID: 2594951
My CRichRditCtrl is one of the object in a form- based window, and I 've to limit the text length according to the user define size, users are allow t o change the size at run time, thus, my CRichEditCtrl has both horizontal and vertical scroll bar and auto text-formatting. Now, my user  request to has grid on the CRichEditCtrl editing area. Sounds like possible if CRichEditView, but how about CRichEditCtrl?

Thanks.
0
 

Author Comment

by:limbe
ID: 2594959
Further explanation, I meant "user defined size" is  in term of characters. Users are allow to specify how many rows and how many characters per row . Thanks.
0
 
LVL 8

Expert Comment

by:gelbert
ID: 2600869
So bacisly you will have to overwrite OnPaint() of you CRichEditCtrl.

But I would suggest to modify sample which I pointed which does almost what you need it derives MFC Grid control from CWnd (in you case it would be CRichEditCtrl).
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change owner from userA to server Local Administrators 7 71
sum13 challenge 24 135
no14 challenge 14 74
changeXy challenge 13 94
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question