📄 fieldmap.cpp
字号:
// FieldMap.cpp : implementation file
//
#include "stdafx.h"
#include "sdf.h"
#include "FieldMap.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFieldMap dialog
CFieldMap::CFieldMap(CWnd* pParent /*=NULL*/)
: CDialog(CFieldMap::IDD, pParent)
{
//{{AFX_DATA_INIT(CFieldMap)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CFieldMap::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFieldMap)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFieldMap, CDialog)
//{{AFX_MSG_MAP(CFieldMap)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFieldMap message handlers
BOOL CFieldMap::OnInitDialog()
{
CDialog::OnInitDialog();
CRect ClientRect;
GetClientRect(ClientRect);
ClientRect.bottom=ClientRect.bottom-50;
m_nPropList.Create(WS_CHILD | WS_VISIBLE | WS_BORDER,ClientRect,this,1001);
AddItemsToPropList();
/*
if (IsWindow(m_nPropList.m_hWnd))
m_nPropList.SetWindowPos(NULL, 0, 0, cx, cy, SWP_NOMOVE | SWP_SHOWWINDOW);
*/
m_nPropList.ShowWindow(TRUE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CFieldMap::AddItemsToPropList()
{
PROPERTYITEMSETUP ItemInfo;
//m_nPropList.AddItem("Name", FPSPROPERTYITEMTYPE_TEXT);
ItemInfo.strName = "Type";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COMBOBOX;
ItemInfo.bAllowComboEdit = FALSE;
ItemInfo.ComboBoxList.AddTail("Type 1");
ItemInfo.ComboBoxList.AddTail("Type 2");
ItemInfo.ComboBoxList.AddTail("Type 3");
ItemInfo.ComboBoxList.AddTail("Custom");
m_nPropList.AddItem(&ItemInfo);
ItemInfo.ComboBoxList.RemoveAll();
ItemInfo.strName = "Type2";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COMBOBOX;
ItemInfo.bAllowComboEdit = FALSE;
ItemInfo.ComboBoxList.AddTail("Type 1");
ItemInfo.ComboBoxList.AddTail("Type 2");
ItemInfo.ComboBoxList.AddTail("Type 3");
ItemInfo.ComboBoxList.AddTail("Custom");
m_nPropList.AddItem(&ItemInfo);
ItemInfo.ComboBoxList.RemoveAll();
ItemInfo.strName = "Type2";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COMBOBOX;
ItemInfo.bAllowComboEdit = FALSE;
ItemInfo.ComboBoxList.AddTail("Type 1");
ItemInfo.ComboBoxList.AddTail("Type 2");
ItemInfo.ComboBoxList.AddTail("Type 3");
ItemInfo.ComboBoxList.AddTail("Custom");
m_nPropList.AddItem(&ItemInfo);
ItemInfo.ComboBoxList.RemoveAll();
ItemInfo.strName = "Type2";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COMBOBOX;
ItemInfo.bAllowComboEdit = FALSE;
ItemInfo.ComboBoxList.AddTail("Type 1");
ItemInfo.ComboBoxList.AddTail("Type 2");
ItemInfo.ComboBoxList.AddTail("Type 3");
ItemInfo.ComboBoxList.AddTail("Custom");
m_nPropList.AddItem(&ItemInfo);
ItemInfo.ComboBoxList.RemoveAll();
ItemInfo.strName = "Type2";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COMBOBOX;
ItemInfo.bAllowComboEdit = FALSE;
ItemInfo.ComboBoxList.AddTail("");
ItemInfo.ComboBoxList.AddTail("Type 2");
ItemInfo.ComboBoxList.AddTail("Type 3");
ItemInfo.ComboBoxList.AddTail("Custom");
m_nPropList.AddItem(&ItemInfo);
/* ItemInfo.strName = "Visible";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_BOOL;
ItemInfo.bBoolValue = TRUE;
m_nPropList.AddItem(&ItemInfo);
ItemInfo.strName = "Fore Color";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COLOR;
ItemInfo.ColorValue = RGB(0, 0, 0);
m_nPropList.AddItem(&ItemInfo);
ItemInfo.strName = "Back Color";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_COLOR;
ItemInfo.ColorValue = RGB(255, 255, 255);
m_nPropList.AddItem(&ItemInfo);
ItemInfo.strName = "Font";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_FONT;
m_nPropList.AddItem(&ItemInfo);
ItemInfo.strName = "File Name";
ItemInfo.dwType = FPSPROPERTYITEMTYPE_FILE;
ItemInfo.bFileOpenDialog = TRUE;
ItemInfo.strFileFilter = "Access Files (*.MDB)|*.mdb|All Files (*.*)|*.*|";
m_nPropList.AddItem(&ItemInfo);
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -