void CPPPropertySheet::OnPaletteChanged(CWnd* pFocusWnd) { ASSERT(pFocusWnd != NULL); HWND hDlg = GetSafeHwnd(); HWND hwndPaletteChange = pFocusWnd->GetSafeHwnd(); if (IsOurWindow(hwndPaletteChange)) FORWARD_WM_PALETTECHANGED(hDlg, hwndPaletteChange, SendMessageToChildren); }
afx_msg void CInPlaceFrame::OnPaletteChanged(CWnd* pFocusWnd) { if (pFocusWnd) { if (IsOurWindow(pFocusWnd->GetSafeHwnd())) { FORWARD_WM_PALETTECHANGED(GetSafeHwnd(), pFocusWnd->GetSafeHwnd(),SendMessageToChildren); } } /**************************************** UNDER CONSTRUCTION ............. CServerDoc *pDoc = (CServerDoc*)GetActiveDocument(); ASSERT(pDoc); if (pDoc) { CServerView *pView = pDoc->GetActiveView(); ASSERT(pView); if (pView) { if (pFocusWnd != pView) { if (lpBltScreen->hPal) { CDC *pDC = pView->GetDC(); pDC->SelectPalette(CPalette::FromHandle(lpBltScreen->hPal), TRUE); pView->ReleaseDC(pDC); } } else { FORWARD_WM_PALETTECHANGED(GetSafeHwnd(), pFocusWnd->GetSafeHwnd(),SendMessageToChildren); } } } ****************************************/ }
void Dialog_OnPaletteChanged(HWND hDlg, HWND hwndPaletteChange) /***********************************************************************/ { if (IsOurWindow(hwndPaletteChange)) FORWARD_WM_PALETTECHANGED(hDlg, hwndPaletteChange, SendMessageToChildren); }