memorytestgraph.h

来自「获得多核硬件所有的相关信息。汇编源代码。Visual Studio2003、20」· C头文件 代码 · 共 49 行

H
49
字号
//---------------------------------------------------------------------------
//
// MemoryTestGraph.h: CMemoryTestGraph Class Header
//
//---------------------------------------------------------------------------

#ifndef MemoryTestGraphH
#define MemoryTestGraphH

class CMemoryTestGraph
{
private:
    HWND        m_hWnd;
    HDC         m_hDC, m_hCompatDC;
    HBITMAP     m_hBitmap, m_hOldBitmap;
    HPEN        m_hPen, m_hOldPen;
    HFONT       m_hFont, m_hOldFont;
    RECT        m_clRect;
    BITMAPINFO  m_bi;
    inline void DeleteBitmap();
    inline void DeletePen();
public:
    CMemoryTestGraph();
    HRESULT __fastcall Connect(HWND hWnd);
    HRESULT __fastcall Disconnect();
    HRESULT __fastcall Resize();
    HRESULT __fastcall CreateBMPFile(LPCSTR pszFile);
    int __fastcall GetImageWidth()
    {
        return m_clRect.right;
    }
    int __fastcall GetImageHeight()
    {
        return m_clRect.bottom;
    }
    // Automated GDI methods
    void __fastcall Clear(BOOL bWhiteBkgnd);
    void __fastcall SetTextColor(BOOL bWhiteBkgnd);
    void __fastcall SetPenParameters(COLORREF clr, int width = 0);
    void __fastcall MoveTo(int X, int Y);
    void __fastcall LineTo(int X, int Y);
    void __fastcall Rectangle(int nLeft, int nTop, int nRight, int nBottom);
    void __fastcall TextExtent(LPCTSTR lpString, LPSIZE lpSize);
    void __fastcall TextOut(int X, int Y, LPCTSTR lpString);
    void __fastcall Paint();
};

#endif

⌨️ 快捷键说明

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