Solved

Show Text in the Status bar of an SDI app

Posted on 2004-04-25
4
376 Views
Last Modified: 2013-11-20
Hi,

I have an SDI application to show an Image. While showing the Image I want to display some Image details on the Status bar of my SDI frame. And I don`t want to display anything else on the Status bar.

How can I do this? I am new in MFC. Please help me.

Thanks in advance,
Jayan
0
Comment
Question by:jayanms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
Nass89 earned 50 total points
ID: 10915445
Hi,
1.
In MainFrm.cpp under indicators[] comment the Indicator you don't want like this:
static UINT indicators[] =
{
      ID_SEPARATOR,           // status line indicator
      ID_STAT_IND,
//      ID_INDICATOR_CAPS,
//      ID_INDICATOR_NUM,
//      ID_INDICATOR_SCRL,
};

2.
define ID_STAT_IND in resource.rc using resource editor, like this:
#define ID_STAT_IND                     57610

3.
Add a global function to your project like this:
void
m_SetPaneText(int Where, char *What)
{
  CWnd* pStatusBarWnd;
   CWnd* pFrameWnd;
   CMainFrame* pFrame;
   CStatusBar* pStatusBar;

   pFrameWnd = AfxGetMainWnd();
   pFrame = STATIC_DOWNCAST( CMainFrame, pFrameWnd );

   pStatusBarWnd = pFrame->GetMessageBar();
   pStatusBar = STATIC_DOWNCAST( CStatusBar, pStatusBarWnd );
   pStatusBar->SetPaneText( Where, What );

}

4.
Call function where you want:
m_SetPaneText(1, "My text on Status Bar");

Good Luck!
0
 

Author Comment

by:jayanms
ID: 10915489
Thank you Nas. It is working okay!
0
 
LVL 5

Expert Comment

by:Nass89
ID: 10915508
Hi,
Thanks for the points. If it works fine, why a "B grade" for it?
0
 
LVL 5

Expert Comment

by:Nass89
ID: 10915548
xx
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 108
Work with App store 7 122
I could not set window to top 4 62
Problem to Office 1 67
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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