?
Solved

CRichEditCtrl with grid

Posted on 2000-03-07
5
Medium Priority
?
417 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

770 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