Solved

FormView and Statusbar

Posted on 1997-09-27
2
305 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
List out all word 7 318
how to you can convert your project to a Maven project and the Maven plugin should download the source 1 49
canBalance challenge 34 98
Change to event 1 119
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 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