1 #pragma once
2 #include "afxwin.h"
3 #include "studiox_includes.h"
4 
5 
6 // edit_pixelmap_dlg dialog
7 
8 typedef struct PIXELMAP_INFO_STRUCT {
9     int compress;
10     int keep_alpha;
11     int dither;
12     int raw;
13     int output_color_format;
14     int output_file_enabled;
15     int palette_type;
16     CString output_file;
17     BOOL binary_mode;
18 }pixelmap_info;
19 
20 class edit_pixelmap_dlg : public express_dialog
21 {
22     DECLARE_DYNAMIC(edit_pixelmap_dlg)
23 
24 public:
25     edit_pixelmap_dlg(res_info *info, CWnd* pParent = NULL);   // standard constructor
26     virtual ~edit_pixelmap_dlg();
27 
28     afx_msg void OnBnClickedBrowse();
29     afx_msg void OnEditImagePath();
30     afx_msg void OnBnClickedOk();
31     afx_msg void OnBnClickedAlpha();
32     afx_msg void OnBnClickedCustomOutput();
33     afx_msg void OnEnChangeOutputFile();
34     afx_msg void OnBnClickedCancel();
35     afx_msg void OnBnClickedPathType();
36     afx_msg void SetPathProjectRelative();
37     afx_msg void SetPathStudioRelative();
38     afx_msg void SetPathAbsolute();
39     virtual BOOL OnInitDialog();
40     afx_msg void OnPaint();
41     afx_msg void OnBnClickedRawFormat();
42     afx_msg void OnCbnSelchangeOutputFormat();
43     afx_msg void OnCbangePaletteDef();
44     //afx_msg void OnEnChangeIdName();
45     afx_msg LRESULT OnTestMessage(WPARAM wParam, LPARAM lParam);
46 
47     static INT *GetAllowedFormats(int display_format);
48     static BOOL IsOutputFormatSupported(int display_format, int output_format);
49 
50 // Dialog Data
51     enum { IDD = IDD_EDIT_PIXELMAP };
52 
53 protected:
54     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
55     DECLARE_MESSAGE_MAP()
56     CEdit mCustomFile;
57     CButton mBinaryMode;
58     res_info *mpInfo;
59     int     mDisplayColorFormat;
60     int     mDisplay;
61     PATHINFO m_pathinfo;
62 
63 private:
64     void SetPathPrefix();
65     BOOL CheckPathname(CString pathname);
66     void EnableDisableRawFields();
67     void ShowHidePaletteType(int selected_format);
68     BOOL HasAlpha(res_info* info);
69     void CheckAlphaStatus(BOOL Initialize = FALSE);
70     void InitPixelmapDlgConfig();
71     void SavePixelmapDlgConfig();
72     BOOL IsPixelmapFolder();
73     void SavePixelmapInfo(res_info *info);
74     BOOL SavePixelmapInfo(int& val, int input_val);
75     void GetPixelmapInfo(res_info *info);
76     void GetPixelmapInfo(int &current_val, int input_val);
77     void SetCheck(int control_id, int check);
78     void GetCheck(int control_id, int &check);
79 
80     CButton mPathTypeButton;
81     CBitmap mPathBitmap;
82 
83     express_combobox mOutputFormatCombo;
84     CStatic mPaletteLabel;
85     express_combobox mPaletteDefList;
86 
87     pixelmap_info mPixelmapInfo;
88 };
89