// Hello585.h // Declarations files for the extended Hello585 MFC Win95 // demonstration program. // Mike Barnes const int minWidth = 350; // minimum window size const int minHeight = 320; const int menuHeight = 50; // menubar inside main window const int palletteHeight = 210; // size of buttons & spaces const int palletteWidth = 100; const int buttonHeight = 50; // button is 50 by 60 const int buttonWidth = 60; const int buttonX1 = 20; // indent button 20 spaces const int buttonX2 = 80; // end of button width from left edge const int padY = 30; // padding between buttons. UINT m_CurrentColor, m_CurrentFont; // Color Reference Table const COLORREF crColors[4] = { RGB (255, 0, 0), // red RGB (0, 0, 255), // blue RGB (0, 255, 0), // green RGB (0, 255, 255) // cyan }; class CPanelWindow; //prototype for forward reference class CMyApp : public CWinApp { public: virtual BOOL InitInstance (); }; class CMainWindow : public CFrameWnd { // main application window private: char message[50]; CPanelWindow * m_buttonPanel; CFont m_ArialFont, m_TimesFont, m_CourierFont; public: CMainWindow (); int m_clientWidth, m_clientHeight; protected: // declare event functions afx_msg void OnSize (UINT, int, int); afx_msg void OnPaint (); afx_msg void OnUsage (); afx_msg void OnAbout (); afx_msg void OnFont (UINT); afx_msg void OnLButtonUp (UINT, CPoint); DECLARE_MESSAGE_MAP () }; class CPanelWindow : public CWnd { // pallette for buttons private: public: CPanelWindow(CMainWindow *); CButton m_ctlRed, m_ctlBlue, m_ctlGreen; protected: afx_msg void OnButton (UINT); afx_msg void OnPaint (); DECLARE_MESSAGE_MAP () };