Solved

CRichEditCtrl with grid

Posted on 2000-03-07
5
387 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
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:gelbert
Comment Utility
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
Comment Utility
0
 

Author Comment

by:limbe
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 44
not able to insert into temp table 68 149
if loop in java 3 114
post4 challenge 28 81
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now