Solved

FormView and Statusbar

Posted on 1997-09-27
2
302 Views
Last Modified: 2013-11-19
I've created a SDI MFC app with a statusbar and the View using the FormView class.

What I want to know is what's the best way to change the status bar text from within the Document cpp file?

I can change it from withing mainfrm.cpp using SetPaneText but can't do it from the document cpp file.
0
Comment
Question by:gav061697
2 Comments
 
LVL 1

Accepted Solution

by:
winmeister earned 100 total points
ID: 1307047
Yes, you can.

CMainFrame* pFrame= (CMainFrame*)AfxGetApp()->m_pMainWnd;
CStatusBar* pStatus =  &(pFrame->m_wndStatusBar);

pStatus->SetPaneText(1,str);


0
 

Author Comment

by:gav061697
ID: 1307048
I take it I can use a similar technique to access other variables in mainfrm.cpp such as m_wndtoolbar etc?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 94
post4 challenge 28 100
sumHeights  challenge 17 71
Capture logon name 13 73
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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