class CTestClass : public Dapfor::Common::CDataObject
{
enum
{
FidPrice,
};
double GetPrice() const {return ...;}
void SetPrice(double newPrice) {...; NotifyUpdate(FidPrice);}
};
DF_BEGIN_FIELD_MAP(CTestClass)
DF_DOUBLE_ID(FidPrice, "Price", &CTestClass::GetPrice, &CTestClass::SetPrice, 0)
DF_END_FIELD_MAP()
CTestClass* testClass;
double price = testClass->GetPrice();
Dapfor::Common::CDataObject* testClass = new CTestClass();
double price = testClass->GetDouble(CTestClass::FidPrice);
double price = testClass->GetValue(CTestClass::FidPrice);
double price = m_Grid.GetValue(hItem, CTestClass::FidPrice);
Dapfor::Common::CDataObject* testClass = ...;
CString mfcText = testClass->GetFormattedMfcString(CTestClass::FidPrice, 0);
std::string stlText = testClass->GetFormattedStlString(CTestClass::FidPrice, 0);
CString mfcText = m_Grid.GetFormattedMfcString(hItem, CTestClass::FidPrice);
std::string stlText = m_Grid.GetFormattedStlString(hItem, CTestClass::FidPrice);
CTestClass* testClass = new CTestClass();
test->SetPrice(...);
m_Grid.SetValue(hItem, CTestClass::FidPrice, (double)1.23);
testClass->SetValue(CTestClass::FidPrice, (double)1.23);
m_Grid.SetFormattedMfcString(hItem, CTestClass::FidPrice, "1.23");
testClass->SetFormattedMfcString(CTestClass::FidPrice, "1.23", 0);