//*********************************************************************** // // PaletteDemo.h // //*********************************************************************** class CMyApp : public CWinApp { public: virtual BOOL InitInstance (); }; class CMainWindow : public CFrameWnd { private: CPalette m_palette; void DoGradientFill (CDC*, CRect*); void DoDrawText (CDC*, CRect*); public: CMainWindow (); protected: afx_msg int OnCreate (LPCREATESTRUCT); afx_msg BOOL OnEraseBkgnd (CDC*); afx_msg void OnPaint (); afx_msg BOOL OnQueryNewPalette (); afx_msg void OnPaletteChanged (CWnd*); DECLARE_MESSAGE_MAP () };