home *** CD-ROM | disk | FTP | other *** search
- // palview.h : interface of the CPalView class
- //
- /////////////////////////////////////////////////////////////////////////////
- #define PIXELS 10
- class CPalView : public CView
- {
- protected: // create from serialization only
- CPalView();
- DECLARE_DYNCREATE(CPalView)
- int iXcells, iYcells; /* number of cells on each axis */
- int iWidth, iHeight;
- int get_xcells(int xsize, int ysize);
- void show_pixel(CPoint point);
- CPalette* m_pPal;
- // Attributes
- public:
- CPalDoc* GetDocument();
- NPLOGPALETTE pLogPal;
- LOCALHANDLE hLocPal;
- BOOL bCaptured; /* mouse capture flag */
-
- // Operations
- public:
-
- // Implementation
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- virtual ~CPalView();
- virtual void OnDraw(CDC* pDC); // overridden to draw this view
- virtual void OnInitialUpdate();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- // Printing support
- protected:
- virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
- virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
- virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CPalView)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg LRESULT OnPalNotify(WPARAM wParam, LPARAM lParam);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- afx_msg void OnMouseMove(UINT nFlags, CPoint point);
- afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
- afx_msg void OnDestroy();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- #ifndef _DEBUG // debug version in palview.cpp
- inline CPalDoc* CPalView::GetDocument()
- { return (CPalDoc*) m_pDocument; }
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
-