Information Bar

This bar is similar to the Outlook, Outlook express, or Front Page 98 editor. It is useful to display application specific information with text and bitmaps. You can change dynamically:

Text, Text Color, Background Color, Text Font, Bitmap.

CInfoBar class have following methods:

SetTextColor(COLORREF crNew);
SetBackgroundColor(COLORREF cr);
SetTextFont(LPCTSTR lpFontName);
SetBitmap(UINT nResID);
SetText(LPCTSTR lpszNew);

Declare in the CMainFrame header member variable


CInfoBar m_InfoBar;

In the CMainFrame OnCreate function call


/// INFO BAR CODE //////////////////////////
m_InfoBar.Create(NULL, NULL, WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | CBRS_TOP,
	         CRect(0,0,0,0), this, AFX_IDW_STATUS_BAR);
m_InfoBar.SetBarStyle(CBRS_ALIGN_TOP);

Download demo project - 46 KB

Download source - 16 KB