HyperEngineer
Programmer
A continuation of the Status Bar in a dialog app. I put the following code in a button click function on a dialog app.
What I get for the client window is:
Top = 186
Bottom = 785
Left = 276
Right = 1005
and for the status bar window is:
Top = 208
Bottom = 208
Left = 279
Right = 279
So it appears that I need a way to positon and size the status bar. Any body know how to do that?
I sure would appreciate some help on this.
HyperEngineer
If it ain't broke, it probably needs improvement.
Code:
CClientDC dlgDC(this);
CWnd* clientWindow = dlgDC.GetWindow();
RECT MyRect;
RECT MyStatusRect;
clientWindow->GetWindowRect(&MyRect);
m_wndStatusBar.GetWindowRect(&MyStatusRect);
CString MyWindowRect;
MyWindowRect.Format("Top = %ld\nBottom = %ld\nLeft = % d\nRight = %ld",
MyRect.top, MyRect.bottom, MyRect.left, MyRect.right);
MessageBox(MyWindowRect);
MyWindowRect.Format("Top = %ld\nBottom = %ld\nLeft = %ld\nRight = %ld",
MyStatusRect.top, MyStatusRect.bottom,
MyStatusRect.left, MyStatusRect.right);
MessageBox(MyWindowRect);
What I get for the client window is:
Top = 186
Bottom = 785
Left = 276
Right = 1005
and for the status bar window is:
Top = 208
Bottom = 208
Left = 279
Right = 279
So it appears that I need a way to positon and size the status bar. Any body know how to do that?
I sure would appreciate some help on this.
HyperEngineer
If it ain't broke, it probably needs improvement.