📄 foimagestatic.h
字号:
// Copyright UCanCode Software Technology Inc, All Rights Reserved
// You can contact us.
// Support@UCanCode.net
// http://www.ucancode.net
/********************************************************************/
#if !defined(AFX_FOIMAGESTATIC_H__02063CA3_04B5_11D6_A4F2_525400EA266C__INCLUDED_)
#define AFX_FOIMAGESTATIC_H__02063CA3_04B5_11D6_A4F2_525400EA266C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FOImageStatic.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CFOImageStatic window
#include "FOCustomStatic.h"
class CFOImageStatic : public CFOCustomStatic
{
DECLARE_DYNAMIC(CFOImageStatic)
// Construction
public:
// Constructs a <c CFOImageStatic> control object.
CFOImageStatic();
virtual BOOL AttachStatic(int nCtlID,CWnd* pParentWnd);
// Operations
public:
// Adds an image or a set of images to this control.
int InsertImage(UINT nBitmapID, int cx = -1,COLORREF crMask = RGB(192,192,192));
// Adds an image or a set of images to this control.
int InsertImage(LPCTSTR lpszBitmapID, int cx = -1, COLORREF crMask = RGB(192,192,192));
// Adds an image or a set of images to this control.
int InsertImage(CBitmap* pBitmap,COLORREF crMask = RGB(192,192,192));
// Returns the caption alignment.
UINT GetCaptionAlign() const;
// Returns the image alignment.
UINT GetImageAlign() const;
// Sets the caption alignment.
void SetCaptionAlign(UINT nAlign);
// Sets the image alignment.
void SetImageAlign(UINT nAlign);
// Sets the image border.
void SetImageBorder(int cx);
// Sets the image spacing.
void SetImageSpacing(int cx);
// Returns the number of images the control has.
int GetImageCount() const;
// Determines if the control has any images.
BOOL HasImages() const;
// Removes an image from this control.
BOOL RemoveImage(int nImage);
// Overrides
public:
//{{AFX_VIRTUAL(CFOImageStatic)
//}}AFX_VIRTUAL
virtual void OnDrawFace(CDC& dc, const CRect& rc, UINT uState);
// Called to position the image and caption.
virtual void GetImageRect(CDC& dc, CRect rcButton,CRect& rcImage, CRect& rcCaption);
// Get focus position.
virtual void GetFaceRect(CDC& dc, CRect rcButton, CRect& rc,BOOL bSizeToContent);
// Adjust size of control.
virtual void AdjustSize(CDC& dc, CRect rc,CRect& rcImage, CRect& rcCaption);
// Adjust size of control.
virtual void AdjustSizeCentered(CDC& dc, CRect rc,CRect& rcImage, CRect& rcCaption);
// Implementation
public:
virtual ~CFOImageStatic();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CFOImageStatic)
afx_msg UINT OnGetDlgCode();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
// Space between images.
int m_cxImageSpacing;
// Extra margin around image.
int m_cxImageBorder;
UINT m_uImageAlign;
UINT m_uCaptionAlign;
CImageList m_images;
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FOIMAGESTATIC_H__02063CA3_04B5_11D6_A4F2_525400EA266C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -