File:  [WindowsNT SDKs] / mstools / samples / gridfont / box.hxx
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:24:04 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-nov-1993, ntsdk-jul-1993, HEAD
Microsoft Windows NT Build 511 (SDK Final Release) 07-24-1993

#ifndef _BOX_HXX_
#define _BOX_HXX_

#include "font.hxx"
#include "grid.hxx"

//====== CTextField =============================
class CTextField
{
public:
        CTextField(TCHAR *sz);
        void Paint(CCanvas &canvas, int x, int y);
        void GetExtent(CCanvas& canvas, SIZE *psize);
        void SetFont(HFONT hfont);
        UINT Hittest(CCanvas& canvas, POINT pt);
protected:
        HFONT _font;
        TCHAR *_sz;
};

//====== CBoxFormat =============================
class CBoxFormat : public CBlockFormat
{
public:
        CFont _fontAlias;
        CFont _fontCtype;
        CBoxFormat(SIZE sizeChar);
};


//====== CBox ===================================
class CBox 
{
public:
        CBox( CBoxFormat &bxf, UINT iChar, HFONT hfont ) ;
        // CBox(CBoxFormat &bxf, UINT iChar);
        //~CBox();
        void Paint(CCanvas &canvas, POINT pt, RECT rc);
        UINT Hittest(CCanvas &canvas, POINT pt);
        SIZE& GetSize() { return _sizeBox; };
protected:
        CCharBlock _Block;
        SIZE  _sizeBox;

        CFont _fontBlock;
        CTextField _Alias;
        UINT _iChar;
        CBoxFormat &_bxf;
};

#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.