Solved

FormView and Statusbar

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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 explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now