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

x
?
Solved

How do I create a statusbar window?

Posted on 1999-07-06
8
Medium Priority
?
724 Views
Last Modified: 2011-10-03
How do I create a statusbar window? I have tried with the CreateStatusWindow(..). But I cant find out what my hwndParant is... how do I get the hwnd for my parent window?
Thanks!!
0
Comment
Question by:bert1
[X]
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
  • 4
  • 3
8 Comments
 

Author Comment

by:bert1
ID: 1199246
This is my window:
void CApp::InitMainWindow()
{
        MainWindow = new TFrameWindow(0, "Test", new CWindow);
}
0
 
LVL 2

Accepted Solution

by:
cpopin earned 10 total points
ID: 1199247
When your parent window is created using CreateWindow() it returns the HWND that you must pass to CreateStatusWindow().  If you're using an application framework, like MFC, there are usually member functions that will return the HWND of a window, like GetSafeHwnd():

m_hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE, "Status report captain!", GetSafeHwnd(), 2000);

You have to store the HWND that CreateStatusWindow() returns in m_hwndStatus so that you can send messages to the status window.  2000 is a unique control ID I just made up for this example.  You'll need that too.



0
 
LVL 2

Expert Comment

by:cpopin
ID: 1199248
Oh, you're using the Borland application framework?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:bert1
ID: 1199249
Yes I am .... borland C++ 5.02 ... that didnt work
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1199250
Then reject my answer now so someone with Borland Builder experience can help you.

My suggestion would be to look at the Builder hiarchy chart starting at TFrameWindow for a base class (like MFC's CWnd) that is a class that represents a window.  Amongst the member functions of this class you should find something like GetHwnd() or GetSafeHwnd().
0
 
LVL 3

Expert Comment

by:Laminamia063099
ID: 1199251
Are you using the OWL framework?
0
 
LVL 2

Expert Comment

by:cpopin
ID: 1199252
Bert1,
I asked you to reject my answer, not to accept it and give me a "D" grade on it.  Your original question never mentioned that you were using the Borland framework.  You should have instead rejected my answer so it could be opened up to other experts to answer it.

Why did you do that?
0
 

Author Comment

by:bert1
ID: 1199253
I did give you your points. I did solve my problem and didn't want this question to be open any more ... but your solution may work to. :-\
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

670 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