Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Status messages to user in a dialog-based application?

Posted on 1999-07-13
Medium Priority
Last Modified: 2013-11-20
I want to add something to a dialog based application that will display read-only status messages to the user.  I am somewhat new to MFC and I am wondering if CRichEditCtrl is the way to do this??   Would there be an easier way?

Question by:klingej
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
  • 3
LVL 23

Expert Comment

ID: 1309779
Simple use CStatic control or CEdit (in read only mode)control. And when ver you have to display some message, call

SetWindowText (your text).... function for that control window.

CStatic msgCtrl;
msgCtrl.SetWindowText (text);

Author Comment

ID: 1309780
Would CEdit work if I want to add on new user messages one line at a time and leave the old messages there..  if the number of lines exceed the size of the control, can I get a vertical scroll bar to show up??

Expert Comment

ID: 1309781
Use a CEdit resource with flag "Read-only".
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.

LVL 23

Expert Comment

ID: 1309782
just curious klingej.. why did ya reject my answer? you could always ask me more information by leaving a comment..

CEdit/CStatic control willdo the job u r trying to do.

In resource editior, change the CEdit style to multiline with VScrollbar option checked. But there will slight gotcha when u try to keep adding strings to control.

You will have to concatnate the new message with new one so that u have old and new ones..

CString oldMsg;
editCtrl.GetWindowMessaage (&oldText);

CString newMessage (_T ("New Message"));

newMessage = oldText + _T ("\r\n") + newMessage;

editCtrl.SetWindowText (newMessage);

Author Comment

ID: 1309783
sorry naveenkohli..  didn't try leaving a comment without rejecting the answer..  you can propose a new answer while I try this..

LVL 23

Accepted Solution

naveenkohli earned 200 total points
ID: 1309784
If it works for you.... then u can accept :))
or you can ask for more info :))

I love chess too :)) (just saw it in ur profile)...
lets have a game some time ...i am not that good a player

Author Comment

ID: 1309785
sorry naveenkohli..  didn't try leaving a comment without rejecting the answer..  you can propose a new answer while I try this..


Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

664 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