rlm@1: #if !defined(AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_) rlm@1: #define AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_ rlm@1: rlm@1: #if _MSC_VER > 1000 rlm@1: #pragma once rlm@1: #endif // _MSC_VER > 1000 rlm@1: // -*- C++ -*- rlm@1: // GBPrinter.h : header file rlm@1: // rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // GBPrinter dialog rlm@1: rlm@1: class GBPrinterDlg : public CDialog rlm@1: { rlm@1: private: rlm@1: u8 bitmapHeader[sizeof(BITMAPINFO)+4*sizeof(RGBQUAD)]; rlm@1: BITMAPINFO *bitmap; rlm@1: u8 bitmapData[160*144]; rlm@1: int scale; rlm@1: // Construction rlm@1: public: rlm@1: void processData(u8 *data); rlm@1: void saveAsPNG(const char *name); rlm@1: void saveAsBMP(const char *name); rlm@1: GBPrinterDlg(CWnd*pParent = NULL); // standard constructor rlm@1: rlm@1: // Dialog Data rlm@1: //{{AFX_DATA(GBPrinterDlg) rlm@1: enum { IDD = IDD_GB_PRINTER }; rlm@1: int m_scale; rlm@1: //}}AFX_DATA rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(GBPrinterDlg) rlm@1: protected: rlm@1: virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: protected: rlm@1: // Generated message map functions rlm@1: //{{AFX_MSG(GBPrinterDlg) rlm@1: afx_msg void OnSave(); rlm@1: afx_msg void OnPrint(); rlm@1: virtual BOOL OnInitDialog(); rlm@1: afx_msg void OnOk(); rlm@1: afx_msg void On1x(); rlm@1: afx_msg void On2x(); rlm@1: afx_msg void On3x(); rlm@1: afx_msg void On4x(); rlm@1: afx_msg void OnPaint(); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: }; rlm@1: rlm@1: //{{AFX_INSERT_LOCATION}} rlm@1: // Microsoft Visual C++ will insert additional declarations immediately before the previous line. rlm@1: rlm@1: #endif // !defined(AFX_GBPRINTER_H__3180CC5A_1F9D_47E5_B044_407442CB40A4__INCLUDED_)