Solved

creating status windows

Posted on 1998-08-19
3
266 Views
Last Modified: 2010-04-10
I need to create four status windows.  How do I create the status window in where I  can write information to any specific windows and also clear that window of any text it may have?
0
Comment
Question by:cmenter
3 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1170703
Is this for MFC?  I believe there are status bar windows for that purpose.  

Otherwise, just use an ordinary static text control window.  (That is, just specify "STATIC" for the window class when you create the window.)  You can then use SetWindowText() and GetWindowText() to set and get the messages in the window.
0
 
LVL 1

Expert Comment

by:bsimser
ID: 1170704
You need to clarify your question. Is this for MFC? BCB? Is it a GUI app or a text app? Like nietod said, you can create as many windows as you want and use SetWindowText() to set the text. I think it would be better to have a listbox if you're using a GUI and add items to it since then you can scroll through them, insert items, etc. More info about what you're trying to do would be good.
0
 

Accepted Solution

by:
TpB earned 100 total points
ID: 1170705
hStsWnd = CreateStatusWindow( WS_CHILD | WS_VISIBLE | CCS_BOTTOM | SBARS_SIZEGRIP, lpszTitle, hParentWnd, hMenuID );

Set lpszTitle to the text you want, and change it with... the messages with

SendMessage( hStsWnd, WM_SETTEXT, 0, lpTitle );
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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

746 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

12 Experts available now in Live!

Get 1:1 Help Now