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

📄 logfont.hxx

📁 Visual C++串口通信编程实践(包括串口调试助手源代码)
💻 HXX
字号:
// LogFont.hxx: header file
//
// Declares CLogFont - implementation file is not defined for this class.
//
// Discussion:
//
//  This is a subclass of the LOGFONT structure and defines 
//  the attributes of a font. See the Microsoft documentation 
//  for more information.
//
// Modification History:
//
//  Bill Berry      March 1996      Creation
//
//  
// Copyright (C) Bill Berry 1996 
//
// This class may be used freely. Please distribute with its
// copyright notice in place.
//
#ifndef LOGFONT_H_E7F7D1A0_AE36_11d1_9257_006097CAB461
#define LOGFONT_H_E7F7D1A0_AE36_11d1_9257_006097CAB461

#ifndef __cplusplus
#   error C++ compilation is required.
#endif

struct CLogFont : public LOGFONT
{
    CLogFont( LONG fontHeight      = -8, 
              LONG fontWeight      = FW_NORMAL,
              UCHAR pitchAndFamily = DEFAULT_PITCH | FF_DONTCARE,
              LPCSTR faceName      = _T("MS Sans Serif" )
            )
    {
        const int size = sizeof(*this);

        memset( this, 0, size );

        lfHeight         = fontHeight;
        lfWeight         = fontWeight;
        lfPitchAndFamily = pitchAndFamily;

        _ASSERT( LF_FACESIZE > lstrlen( faceName ) );

        lstrcpy( lfFaceName, faceName );
    }

    // Note: No need for CLogFont& operator =(const CLogFont& lf) {...}
    //       We let the compiler handle it...

    void lfFaceNameSet( LPCSTR faceName )
    {
        _ASSERT( faceName );

        if ( !faceName ) return;

        _ASSERT( LF_FACESIZE > lstrlen( faceName ) );

        lstrcpy( lfFaceName, faceName );        
    }

};

#endif // LOGFONT_H_E7F7D1A0_AE36_11d1_9257_006097CAB461

⌨️ 快捷键说明

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