// set the message bar text if (lParam != 0) { ASSERT(wParam == 0); // can't have both an ID and a string lpsz = (LPCTSTR)lParam; // set an explicit string } elseif (wParam != 0) { // map SC_CLOSE to PREVIEW_CLOSE when in print preview mode if (wParam == AFX_IDS_SCCLOSE && m_lpfnCloseProc != NULL) wParam = AFX_IDS_PREVIEW_CLOSE;
// get message associated with the ID indicated by wParam //NT64: Assume IDs are still 32-bit GetMessageString((UINT)wParam, strMessage); lpsz = strMessage; } pMessageBar->SetWindowText(lpsz);
// update owner of the bar in terms of last message selected CFrameWnd* pFrameWnd = pMessageBar->GetParentFrame(); if (pFrameWnd != NULL) { pFrameWnd->m_nIDLastMessage = (UINT)wParam; pFrameWnd->m_nIDTracking = (UINT)wParam; } }
m_nIDLastMessage = (UINT)wParam; // new ID (or 0) m_nIDTracking = (UINT)wParam; // so F1 on toolbar buttons work return nIDLast; }