[問題] 自訂Head檔中#ifndef的問題
這是網路上抓的改寫CStatic的head檔寫法
請問為什麼最前面要加上
#ifndef _TSTATIC_H_
#define _TSTATIC_H_
這有什麼意義嗎?
#ifndef _TSTATIC_H_
#define _TSTATIC_H_
// TStatic
class TStatic : public CStatic
{
DECLARE_DYNAMIC(TStatic)
private:
COLORREF m_textcolor;
COLORREF m_bkcolor;
CBrush m_brush;
CFont m_Font;
public:
TStatic();
virtual ~TStatic();
CString m_text;
void SetTextColor(COLORREF);
void SetBkColor(COLORREF);
void SetText(CString);
void ChangeFont(CString fontstyle="新細明體", int Size=12, BYTE lfItalic=0,
LONG lfWeight=FW_NORMAL);
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg LRESULT OnChangeText(WPARAM, LPARAM);
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
};
#endif
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.141.134.23
→
03/12 17:30, , 1F
03/12 17:30, 1F
→
03/12 17:36, , 2F
03/12 17:36, 2F
推
03/12 17:38, , 3F
03/12 17:38, 3F
→
03/12 18:18, , 4F
03/12 18:18, 4F
推
03/12 19:05, , 5F
03/12 19:05, 5F
→
03/12 20:11, , 6F
03/12 20:11, 6F
→
03/30 16:30, , 7F
03/30 16:30, 7F