| 822 | } |
| 823 | |
| 824 | LRESULT OnSettingChange(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) |
| 825 | { |
| 826 | // Custom styles |
| 827 | m_di.dwExtStyle = m_dwExtStyle; |
| 828 | // Standard colors |
| 829 | m_di.clrText = ::GetSysColor(COLOR_WINDOWTEXT); |
| 830 | m_di.clrBack = ::GetSysColor(COLOR_WINDOW); |
| 831 | m_di.clrSelText = ::GetSysColor(COLOR_HIGHLIGHTTEXT); |
| 832 | m_di.clrSelBack = ::GetSysColor(COLOR_HIGHLIGHT); |
| 833 | m_di.clrDisabled = ::GetSysColor(COLOR_GRAYTEXT); |
| 834 | // Border |
| 835 | m_di.clrBorder = ::GetSysColor(COLOR_BTNFACE); |
| 836 | if( !m_BorderPen.IsNull() ) m_BorderPen.DeleteObject(); |
| 837 | m_di.Border = m_BorderPen.CreatePen(PS_SOLID, 1, m_di.clrBorder); |
| 838 | // Fonts |
| 839 | if( !m_TextFont.IsNull() ) m_TextFont.DeleteObject(); |
| 840 | if( !m_CategoryFont.IsNull() ) m_CategoryFont.DeleteObject(); |
| 841 | LOGFONT lf; |
| 842 | HFONT hFont = (HFONT)::SendMessage(GetParent(), WM_GETFONT, 0, 0); |
| 843 | if( hFont == NULL ) hFont = AtlGetDefaultGuiFont(); |
| 844 | ::GetObject(hFont, sizeof(lf), &lf); |
| 845 | m_di.TextFont = m_TextFont.CreateFontIndirect(&lf); |
| 846 | SetFont(m_di.TextFont); |
| 847 | if( (m_dwExtStyle & PLS_EX_XPLOOK) == 0 ) lf.lfWeight += FW_BOLD; |
| 848 | m_di.CategoryFont = m_CategoryFont.CreateFontIndirect(&lf); |
| 849 | // Text metrics |
| 850 | CClientDC dc(m_hWnd); |
| 851 | HFONT hOldFont = dc.SelectFont(m_di.TextFont); |
| 852 | dc.GetTextMetrics(&m_di.tmText); |
| 853 | dc.SelectFont(hOldFont); |
| 854 | // Repaint |
| 855 | Invalidate(); |
| 856 | return 0; |
| 857 | } |
| 858 | |
| 859 | LRESULT OnNavigate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/) |
| 860 | { |
nothing calls this directly
no test coverage detected