colorwnd.h

来自「客户端: 这是一个完整的基于Wince 4.1图形图象,网络通讯(C/S)模式」· C头文件 代码 · 共 69 行

H
69
字号
#if !defined(AFX_COLORWND_H__848C2D62_3E99_4BA3_A948_B963CA7BDD8A__INCLUDED_)
#define AFX_COLORWND_H__848C2D62_3E99_4BA3_A948_B963CA7BDD8A__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CColorWnd window

class CColorWnd : public CStatic
{
// Construction
public:
	CColorWnd();

// Attributes
public:

// Operations
public:
   long GetFontSizeW(HDC hdc,LPCTSTR str,long len)
   {
     SIZE size;
     GetTextExtentPoint32(hdc,str,len,&size);
     return(size.cx);
   }
   long GetFontSizeH(HDC hdc,LPCTSTR str,long len) 
   {
     SIZE size;
     GetTextExtentPoint32(hdc,str,len,&size);
     return(size.cy);
   }
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CColorWnd)
	//}}AFX_VIRTUAL

// Implementation
public:
	void SetBkColor(COLORREF m_color);
    void SetFgColor(COLORREF m_color);
	void SetText(CString str);
	CString GetText(void);
	COLORREF m_bkcolor;
	COLORREF m_fgcolor;
	CString  m_text_str;
public:
	virtual ~CColorWnd();

	// Generated message map functions
protected:
	//{{AFX_MSG(CColorWnd)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPaint();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_COLORWND_H__848C2D62_3E99_4BA3_A948_B963CA7BDD8A__INCLUDED_)

⌨️ 快捷键说明

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