// SegmentProperties.cpp : implementation file // #include "stdafx.h" #include "SegmentProperties.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CSegmentProperties dialog CSegmentProperties::CSegmentProperties(int left, int top, int right, int bottom, int type, CWnd* pParent /*=NULL*/) : CDialog(CSegmentProperties::IDD, pParent) { //{{AFX_DATA_INIT(CSegmentProperties) m_nBottom = bottom; m_nLeft = left; m_nRight = right; m_sType = _T(""); m_nTop = top; //}}AFX_DATA_INIT switch(type) { case SEGTYPE_BACKGROUND: m_sType = _T("Back Ground segment"); break; case SEGTYPE_ONECOLOR: m_sType = _T("One Color segment"); break; case SEGTYPE_TEXT_1BIT_BW: m_sType = _T("Text 1-Bit(B & W)"); break; case SEGTYPE_TEXT_1BIT_COLOR: m_sType = _T("Text 1-Bit(Colored)"); break; case SEGTYPE_TEXT_2BITBW: m_sType = _T("Text segment 2-Bit(B & W)"); break; case SEGTYPE_TEXT_2BIT_COLOR: m_sType = _T("Text 2-Bit(Colored)"); break; case SEGTYPE_GRAYSCALE_2BIT: m_sType = _T("Grayscale 2-Bit"); break; case SEGTYPE_GRAYSCALE_8BIT: m_sType = _T("Grayscale 8-Bit"); break; case SEGTYPE_PICTURE: m_sType = _T("Picture 24-Bit"); break; } } void CSegmentProperties::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CSegmentProperties) DDX_Text(pDX, IDC_EDIT_BOTTOM, m_nBottom); DDX_Text(pDX, IDC_EDIT_LEFT, m_nLeft); DDX_Text(pDX, IDC_EDIT_RIGHT, m_nRight); DDX_Text(pDX, IDC_EDIT_SEGMENTTYPE, m_sType); DDX_Text(pDX, IDC_EDIT_TOP, m_nTop); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CSegmentProperties, CDialog) //{{AFX_MSG_MAP(CSegmentProperties) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CSegmentProperties message handlers BOOL CSegmentProperties::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }