Thread: Text in status bar

  1. #1

    Text in status bar

    I found this piece of code on the internet
    CString s = "Text";
    CStatusBar* p =
    p->SetPaneText(1, s);
    It is supposed to write some text in the statusbar but I can't get it to work. Is there anyone that have any good ideas about how do do this.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Never mind I figured out what I needed to do
    void Prog::Test() 
    CString s = "Text";
    CStatusBarCtrl* p = (CStatusBarCtrl*)AfxGetApp()->m_pMainWnd->GetDescendantWindow(AFX_IDW_STATUS_BAR);
    p->SetText(s,255,SBT_NOBORDERS   );
    That works better

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. Windows API... Status Bar problems.
    By switchcase in forum Windows Programming
    Replies: 6
    Last Post: 10-11-2007, 04:59 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. program won't create status bar
    By Unregistered in forum Windows Programming
    Replies: 7
    Last Post: 08-30-2001, 04:00 PM