How do I put a chunk of text on the dialogue window?

I need to write a list of instructions in the dialogue to tell the user what to do.
I tried to use the Static Text control and put what I want to write in the Caption box;
however, there is a limit of how many characters I can put in it, which is 255.
Can anybody tell me what should I do? I am pretty sure what is a way but I just haven't
been able to find out how.

Thanks!
UltimateApocalypseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlexFMCommented:
Number of characters in Static control is not limited. Please show your code, possibly you have some error.
0
komarCommented:
Try showing the instructions at run time. This can be done by adding the following code to your OnInitDialog() member of the dialog object.

CString strInstructions = _T("1. Instruction1\r\n")
                                    _T("2. Instruction2\r\n")
                                    _T("3. Instruction3\r\n");

CStatic *p = (CStatic *)GetDlgItem(IDC_MY_STATIC);
p->SetWindowText(strInstructions);

/*In this code, I assumed that the ID of the Static control in the dialog resource is IDC_MY_STATIC */
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sekhar_eeCommented:
Yes  What AlexFM told is correct. There is no limit in the number of characters.

I tried the same sample that was given by you... I am able to show more than 1000 charcaters in the static text.
Probably the size of your static text is very less so that it is unable to display all the characters.

0
ragin_cajunCommented:
Hi,

perhaps the static text control limit has changed - my Practical Visual C++ book says static text controls have a limit of 255 characters. Anyways, I've had the same problem, and what I've had to do in the past is group multiple controls together to output a chunk of text.

OR if you feel comfortable doing it - you can handle the WM_PAINT message, and in there obtain a device context of your window and output as much text as you want using TextOut() or DrawText() - this is more complicated but definitely possible. It will work. If you want some more info plz post.
0
UltimateApocalypseAuthor Commented:
Thanks!!
I was trying to input the instructions directly in the Caption edit box, I guess that's probably why it did not work.
Maybe it isn't the correct way of using the Static Text Control.
Anyway, komar's solution is very convenient and easy to use.
Thanks again!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.