本程序主要实现电影中的致谢界面:参加人员滚动显示。参见下图。
实现步骤如下:
#define DISPLAY_TIMER_ID 150 timer id RECT m_ScrollRect,r; // rect of Static Text frame int nArrIndex,nCounter; // work ints CString m_szWork; // holds display line BOOL m_bFirstTime; // first time boolean BOOL m_bDrawText; // drawing text or bitmap? int nClip; // clip amount int nCurrentFontHeight; // current font height CWnd* m_pDisplayFrame; // output display wnd CBitmap m_bmpPIE; CBitmap m_bmpWork; CBitmap* pBmpOld; CBitmap* m_bmpCurrent; HBITMAP m_hBmpOld; CSize m_size; CPoint m_pt; BITMAP m_bmpInfo; CDC m_dcMem; BOOL m_bProcessingBitmap;
virtual void OnOK(); afx_msg void OnPaint(); virtual BOOL OnInitDialog(); afx_msg void OnTimer(UINT nIDEvent); afx_msg void OnDestroy();
CCredits dlgCredits; dlgCredits.DoModal();
>>> DOWN !!! >>>下载源代码及演示程序