rlm@1: #if !defined(AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_) rlm@1: #define AFX_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_ rlm@1: rlm@1: #if _MSC_VER > 1000 rlm@1: #pragma once rlm@1: #endif // _MSC_VER > 1000 rlm@1: // PaletteViewControl.h : header file rlm@1: // rlm@1: #define WM_PALINFO WM_APP+1 rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // PaletteViewControl window rlm@1: rlm@1: class PaletteViewControl : public CWnd rlm@1: { rlm@1: int w; rlm@1: int h; rlm@1: int colors; rlm@1: u8 *data; rlm@1: BITMAPINFO bmpInfo; rlm@1: static bool isRegistered; rlm@1: int selected; rlm@1: protected: rlm@1: u16 palette[256]; rlm@1: int paletteAddress; rlm@1: // Construction rlm@1: public: rlm@1: PaletteViewControl(); rlm@1: rlm@1: virtual void updatePalette()=0; rlm@1: rlm@1: // Attributes rlm@1: public: rlm@1: rlm@1: // Operations rlm@1: public: rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(PaletteViewControl) rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: public: rlm@1: void registerClass(); rlm@1: void refresh(); rlm@1: void render(u16 color, int x, int y); rlm@1: void setSelected(int s); rlm@1: void setPaletteAddress(int address); rlm@1: bool saveJASCPAL(const char *name); rlm@1: bool saveMSPAL(const char *name); rlm@1: bool saveAdobe(const char *name); rlm@1: void init(int c, int w, int h); rlm@1: virtual ~PaletteViewControl(); rlm@1: rlm@1: // Generated message map functions rlm@1: protected: rlm@1: //{{AFX_MSG(PaletteViewControl) rlm@1: afx_msg void OnLButtonDown(UINT nFlags, CPoint point); rlm@1: afx_msg BOOL OnEraseBkgnd(CDC* pDC); rlm@1: afx_msg void OnPaint(); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: }; rlm@1: 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_PALETTEVIEWCONTROL_H__31F600AE_B7E5_4F6C_80B6_55E4B61FBD57__INCLUDED_)