1 #pragma once 2 #include "express_dialog.h" 3 4 #define MAX_RECENT_PROJECTS 5 5 #define RECENT_WINDOW_WIDTH 700 6 #define RECENT_WINDOW_HEIGHT 220 7 8 class recent_list_frame : public CWnd 9 { 10 public: 11 recent_list_frame(CWnd* parent = NULL); 12 ~recent_list_frame(); 13 void UpdateRecentList(); 14 15 private: 16 DECLARE_MESSAGE_MAP() 17 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 18 afx_msg void OnMouseMove(UINT nFlags, CPoint point); 19 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 20 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); 21 afx_msg BOOL OnEraseBkgnd(CDC* pDC); 22 virtual BOOL PreTranslateMessage(MSG* pMsg); 23 afx_msg void OnSetFocus(CWnd* pOldWnd); 24 afx_msg void OnKillFocus(CWnd* pNewWnd); 25 int FindStatic(CPoint point); 26 int GetRowHeight(); 27 28 private: 29 CStatic mRecentList[MAX_RECENT_PROJECTS]; 30 int mHighlightRow; 31 CBrush mHiBrush; 32 CBrush mBgBrush; 33 CBrush mGrayBrush; 34 int mNumRecentProjects; 35 }; 36 37 class recent_project_win : public express_dialog 38 { 39 public: 40 recent_project_win(int width, int height, CWnd* pParent = NULL); // standard constructor 41 virtual ~recent_project_win(); 42 void UpdateRecentList(); 43 static CRect GetCreateNewProjectButtonSize(CRect& parentSize); 44 45 protected: 46 DECLARE_MESSAGE_MAP() 47 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 48 afx_msg void OnShowWindow(BOOL, UINT); 49 afx_msg void OnBnClickedCreateProject(); 50 virtual BOOL PreTranslateMessage(MSG* pMsg); 51 52 private: 53 recent_list_frame mRecentListFrame; 54 custom_bitmap_button new_button; 55 }; 56