m_ImageList.Create(32, 32, ILC_COLOR16ILC_MASK,1, 4);
HICON hIcon = ::LoadIcon (AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_LOG));
m_ImageList.Add(hIcon);
hIcon = ::LoadIcon (AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ONLINE_USERS));
m_ImageList.Add(hIcon);
hIcon = ::LoadIcon (AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_CONFIGURATION));
m_ImageList.Add(hIcon);
hIcon = ::LoadIcon (AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_STATISTICS));
m_ImageList.Add(hIcon);
hIcon = ::LoadIcon (AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_SECURITY));
m_ImageList.Add(hIcon);
m_OutlookBar.SetImageList(&m_ImageList, LVSIL_NORMAL);
CRect rc;
m_OutlookBar.GetClientRect(rc);
// set new icon spacing
m_OutlookBar.SetIconSpacing(rc.Width(), 64);
// change colors
m_OutlookBar.SetTextColor(RGB(255,255,255));
m_OutlookBar.SetTextBkColor(RGB(128,128,128));
m_OutlookBar.SetBkColor(RGB(128,128,128));
// insert items
m_OutlookBar.InsertColumn(0, "OutlookBar");
m_OutlookBar.InsertItem(0, "Server Log", 0);
m_OutlookBar.InsertItem(1, "Online Users", 1);
m_OutlookBar.InsertItem(2, "Configuration", 2);
m_OutlookBar.InsertItem(3, "Statistics", 3);
m_OutlookBar.InsertItem(4, "Security", 4);
原文地址:http://blog.csdn.net/goingup/archive/2006/03/05/615885.ASPx