CPromptEdit | CodeGuru

CPromptEdit

Environment: The following project implements a derived box from CEdit featuring a prompt command. The code guarantees to work well depending on the options that developer chooses when drawing the dialog box: they should be preserved as those included in the following project (MULTILINE, AUTOVSCROLL …). I do not put any code here, because it […]

Written By
CodeGuru Staff
CodeGuru Staff
Feb 21, 2002
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment:

The following project implements a derived box from CEdit featuring a prompt command.

The code guarantees to work well depending on the options that developer chooses when drawing the dialog box: they should be preserved as those included in the following project (MULTILINE, AUTOVSCROLL …).

I do not put any code here, because it would be unuseful and much boring. In fact the code of CPromptBox is very simple and it should be understood easily at running time, since the matter is just to rule the caret movement at each row, or just taking the string of every row.


Anyway, some attention should be payed to how to connect the prompt of a working class (for example: a parser). I have implemented a simple method in this project, where CPromptEdit communicates with a report box on the right.

Look at the image below:

Anyway a lot of other methods can be come out, according to your needs or fantasy, so …

… comments and suggestions are very well appreciated both in this site
and directly to me at : my e-mail

Downloads

VC++ 5.0 project – 22 Kb

The class code – 4 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.