📄 animatectrl.h
字号:
#if !defined(AFX_ANIMATE__INCLUDED_)
#define AFX_ANIMATE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <string>
#define PSTYLE_CENTER 1
#define PSTYLE_NORMAL 0
#define PSTYLE_STRETCH 2
#define LIST_TAIL -1
#define LIST_HEAD -2
class CAnimate_Ctrl : public CStatic
{
DECLARE_DYNCREATE(CAnimate_Ctrl)
public:
CAnimate_Ctrl();
virtual ~CAnimate_Ctrl();
void addFrame(int nPos, const CString& strFileName);
void addFrame(int nPos, HBITMAP hbm);
void removeFrame(int nPos);
int pictureStyle() const { return m_pictureStyle; }
void setPictureStyle(int nPStyle) { m_pictureStyle = nPStyle; }
void setFMS(UINT n) { m_nFMS = n; }
UINT FMS() const { return m_nFMS; }
void startAnim();
void stopAnim();
bool isAnimaing() const { return m_bAnimate; }
void ascii2unicode(LPCTSTR str, wchar_t* strout);
int picCount() const { return m_iList.GetCount(); }
void setBkCol(COLORREF col) { m_backCol = col; }
COLORREF bkCol() const { return m_backCol; }
afx_msg void OnPaint();
typedef CList <Image*, Image*> CGDIPImageList;
struct transfer {
CGDIPImageList* piList;
int pstyle;
UINT FMS;
bool* bAnim;
HWND hwnd;
COLORREF backcol;
};
private:
CGDIPImageList m_iList; //the list of images
int m_pictureStyle;
UINT m_nFMS; //miliseconds between two frames
bool m_bAnimate;
COLORREF m_backCol;
transfer m_transfer;
DECLARE_MESSAGE_MAP()
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -