⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 translucentwnd.h

📁 Under CE4.2 view bitmap with shrink and magnify
💻 H
字号:
#if !defined(AFX_ALPHAINDICATORWND_H__6DB25D54_BC0E_4933_A0C0_A57349B69538__INCLUDED_)
#define AFX_ALPHAINDICATORWND_H__6DB25D54_BC0E_4933_A0C0_A57349B69538__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TranslucentWnd.h : header file
//

#include "MemDC.h"

//#define WM_TRANSLUCENTBTN  (WM_APP+1000)
/////////////////////////////////////////////////////////////////////////////
// CTranslucentWnd window

class CTranslucentWnd : public CWnd
{
// Construction
public:
	CTranslucentWnd();

// Attributes
public:
	CMemDC    m_memIcon;
	CMemDC    *m_pMemBG;

	LPBYTE	  m_pMenuBits;
	LPBYTE	  m_pBits;

	CWnd     *m_pParentWnd;
	UINT      m_nID;

	BOOL      m_bMSGFlag;

	UINT      m_nUpIcon;
    UINT      m_nDownIcon;
	UINT      m_nCurIcon;//icon

	int       m_nMode;
private:
//	static   BOOL   m_sbRefresh;

//	BOOL       m_bActive;
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTranslucentWnd)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetFillMode(int nMode);
	void WriteBackBG(CMemDC *pMemDC);
	void DrawIcon(CDC *pDC, CPoint pt, UINT nIcon);
	void SetIcon(UINT nUpIcon, UINT nDownIcon);
	void SetBkMem(CMemDC *pMemDC);
	void FillRect(CDC* pDC, LPRECT lpRect, COLORREF crColor = RGB(255,255,255)/*= FORMBACKCOLOR*/, int nAlpha = 35/*= 80*/);
	void Popup();
	void InitMem(CDC *pDC);
	void RefreshBG(CMemDC *pMemDC);
	void Create(CWnd *pParentWnd, const RECT& rect, UINT nID);
	virtual ~CTranslucentWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CTranslucentWnd)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
//	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
//	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

void pecAlphaBlend(const PBYTE pDestBits, const PBYTE pBits, int nAlpha, int nWidth, int nHeight);
HBITMAP pecCreateDIBBitmap(HDC hDC, void** ppvBits, int nWidth, int nHeight);
/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ALPHAINDICATORWND_H__6DB25D54_BC0E_4933_A0C0_A57349B69538__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -