|
// TranslucentDialog.h : ͷ�ļ�
//
#pragma once
#include "StandardDialog.h"
#include "TranslucentWnd.h"
#include <list>
typedef std::list<CTranslucentWnd*> TranslucentWndList;
// CTranslucentDialog �Ի���
class CTranslucentDialog : public CDialog, public IRenderListener
{
// ����
public:
CTranslucentDialog(UINT nIDTemplate, LPCTSTR lpszFile, CWnd* pParent = NULL);
CTranslucentDialog(UINT nIDTemplate, UINT nImgID, LPCTSTR lpszType = _T("PNG"), HINSTANCE hResourceModule = NULL, CWnd* pParent = NULL);
virtual ~CTranslucentDialog();
void SetEnableDrag(bool bEnableDrag);
void SetCenterAligned(bool bCenterAligned);
virtual CStandardDialog* CreateStandardDialog() = 0;
virtual void OnInitChildrenWnds() = 0;
void RegisterTranslucentWnd(CTranslucentWnd* translucentWnd);
void UnregisterTranslucentWnd(CTranslucentWnd* translucentWnd);
void StartBuffered();
void EndBuffered();
virtual void OnRenderEvent(CTranslucentWnd* translucentWnd);
void UpdateView();
// ʵ��
protected:
BLENDFUNCTION m_blend;
Gdiplus::Image* m_pImage;
//RECT m_rcWindow;
bool m_bEnableDrag;
bool m_bCenterAligned;
bool m_bBuffered;
CStandardDialog* m_pStandardDlg;
TranslucentWndList m_translucentWndList;
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
private:
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnMove(int x, int y);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
D.K.Wang is working for a leading interactive entertainment media company located in Shanghai, China. Skilled in Windows C++, MFC, WTL, PHP etc. Started with professional games development since 2005, now devoted to the core functionality such as graphics rendering, physics simulation and scene management for a household game engine.