在状态栏内显示图片
BOOL CGobangView::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default
if (nHitTest == HTCLIENT)
{
if (m_turn)
{
CMainFrame * myframe = (CMainFrame *)AfxGetApp()-> m_pMainWnd;
CStatusBar *pStaB = &myframe-> m_wndStatusBar;
if (pStaB)
{
pStaB-> GetStatusBarCtrl().SetIcon(0, AfxGetApp()-> LoadCursor(IDI_BLACK)); //这个IDI_BLACK图片就是不能在StatusBar中显示
pStaB-> SetPaneText(0, "黑棋下 "); //这里的文字可以在StatusBar中显示
}
SetCursor(m_blackCur);
}
为什么文字可以显示,图片不能显示,我哪里错了?
[解决办法]
要么放在状态栏的两个不同Pane中,要么自绘。