|
-
May 13th, 1999, 03:31 AM
#1
Status bar problem
I have created a status bar on my Child windows to show the amount of Scaling in the window. This works fine until the scale value reached 10, and the value is replaced by characters. For example, at a scale of 17 the out is "Scale value : A"
Could somebody please tell me what's wrong?
Thank you,
Sean.
-
May 13th, 1999, 09:40 PM
#2
Re: Status bar problem
This is where my problem is
>>>CString StatusMsg("Zoom :");
>>>StatusMsg += static_cast<char>('0' + Zoom);
Zoom is an INT that represents the scale factor. I took this code from an example in a book, but in this example the maximum value of Zoom is 8, so this code works fine. How do I edit it so it will display values of Zoom greater than 9?
Thanks again,
Sean.
-
May 13th, 1999, 09:44 PM
#3
Re: Status bar problem - sample code i'm using.
Here is the sample code that I'm using :
******************************
// Get the frame window for this view
CChildFrame* viewFrame = static_cast<CChildFrame*>(GetParentFrame());
// Build the message string
CString StatusMsg("Zoom :");
StatusMsg += static_cast<int>('0' + m_Zoom);
// Write the string to the status bar
viewFrame->m_StatusBar.GetStatusBarCtrl().SetText(StatusMsg, 0, 0);
******************************
-
May 14th, 1999, 04:32 AM
#4
Re: Status bar problem - sample code i'm using.
CString StatusMsg;
StatusMsg.Format("Zoom :%d", m_Zoom);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|