Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FormView and Statusbar

Posted on 1997-09-27
2
Medium Priority
?
326 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 400 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

916 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