Click here to Skip to main content
15,891,375 members
Articles / Desktop Programming / MFC

A skinned dialog in Python and MFC

Rate me:
Please Sign up or sign in to vote.
4.29/5 (4 votes)
24 Jul 2011CPOL3 min read 47.9K   6.6K   35  
Help to make a skinned dialog program easily in Python, XML with a UI window DLL.
#pragma once

#include "BNUIFace.h"
// CBNUIWnd

class CBNUIWnd : public CWnd , public CBNUIFace
{
	DECLARE_DYNAMIC(CBNUIWnd)

public:
	CBNUIWnd();
	virtual ~CBNUIWnd();

	BOOL Initialize();
	VOID Finalize();
	BOOL OpenTheWindow();
	VOID CloseTheWindow();
	BOOL SetAttributes(CUnit* pUnit);

private:
	BOOL RegisterClass();

private:
	CWnd*		m_pParentWnd;
	DWORD		m_dwStyle;
	DWORD		m_dwExStyle;
	static BOOL m_bRegisterClassWnd;

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
};

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer SEC
Korea (Republic of) Korea (Republic of)
Worked and Working as Windows, Game Software, Mobile Developer.

Comments and Discussions