bool GcScreenMeshPropEntity::Init() { GcPropertyGridProperty* pGroup = NULL; pGroup = new GcPropertyGridProperty(_T("메쉬 정보")); mpProperty = pGroup; GcPropertyGridProperty* pProp = NULL; pProp = new GcPropertyGridProperty(_T("파일 이름"), (_variant_t) _T(""), _T("캐릭터 이름을 지정합니다.")); pProp->AllowEdit( FALSE ); pGroup->AddSubItem( pProp ); std::auto_ptr<CMFCPropertyGridProperty> apSize(new GcPropertyGridNumberPair(_T("Mesh Scale Info") , 0, GINT_MAX, 0, GINT_MAX, 0, TRUE)); apSize->AllowEdit( false ); pProp = new GtBoundedNumberSubProp(_T("Height"), (COleVariant) 250l, 0, GINT_MAX, _T("Specifies the dialog's height")); pProp->EnableSpinControl( TRUE, 0, GINT_MAX ); pProp->SetData( MSG_HEIGHT ); apSize->AddSubItem( pProp ); pProp = new GtBoundedNumberSubProp( _T("Width"), (COleVariant) 150l, 0, GINT_MAX, _T("Specifies the dialog's width")); pProp->EnableSpinControl( TRUE, 0, GINT_MAX ); pProp->SetData( MSG_WIDTH ); apSize->AddSubItem( pProp ); pGroup->AddSubItem( apSize.release() ); return true; }
void CPropertiesViewBar::InitPropList() { SetPropListFont(); m_wndPropList.EnableHeaderCtrl(FALSE); m_wndPropList.EnableDescriptionArea(); m_wndPropList.SetVSDotNetLook(); m_wndPropList.MarkModifiedProperties(); std::auto_ptr<CMFCPropertyGridProperty> apGroup1(new CMFCPropertyGridProperty(_T("Appearance"))); apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), (_variant_t) false, _T("Specifies the dialog's font will be nonbold and controls will have a 3D border"))); CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"), _T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame")); pProp->AddOption(_T("None")); pProp->AddOption(_T("Thin")); pProp->AddOption(_T("Resizable")); pProp->AddOption(_T("Dialog Frame")); pProp->AllowEdit(FALSE); apGroup1->AddSubItem(pProp); apGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (_variant_t) _T("About"), _T("Specifies the text that will be displayed in the dialog's title bar"))); m_wndPropList.AddProperty(apGroup1.release()); std::auto_ptr<CMFCPropertyGridProperty> apSize(new CMFCPropertyGridProperty(_T("Window Size"), 0, TRUE)); pProp = new CMFCPropertyGridProperty(_T("Height"), (_variant_t) 250l, _T("Specifies the dialog's height")); pProp->EnableSpinControl(TRUE, 0, 1000); apSize->AddSubItem(pProp); pProp = new CMFCPropertyGridProperty( _T("Width"), (_variant_t) 150l, _T("Specifies the dialog's width")); pProp->EnableSpinControl(TRUE, 1, 500); apSize->AddSubItem(pProp); m_wndPropList.AddProperty(apSize.release()); std::auto_ptr<CMFCPropertyGridProperty> apGroup2(new CMFCPropertyGridProperty(_T("Font"))); LOGFONT lf; CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT)); font->GetLogFont(&lf); lstrcpy(lf.lfFaceName, _T("Arial")); apGroup2->AddSubItem(new CMFCPropertyGridFontProperty(_T("Font"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("Specifies the default font for the dialog"))); apGroup2->AddSubItem(new CMFCPropertyGridProperty(_T("Use System Font"), (_variant_t) true, _T("Specifies that the dialog uses MS Shell Dlg font"))); m_wndPropList.AddProperty(apGroup2.release()); std::auto_ptr<CMFCPropertyGridProperty> apGroup3(new CMFCPropertyGridProperty(_T("Misc"))); pProp = new CMFCPropertyGridProperty(_T("(Name)"), _T("IDD_ABOUT_BOX(dialog)")); pProp->Enable(FALSE); apGroup3->AddSubItem(pProp); CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("Window Color"), RGB(210, 192, 254), NULL, _T("Specifies the default dialog color")); pColorProp->EnableOtherButton(_T("Other...")); pColorProp->EnableAutomaticButton(_T("Default"), ::GetSysColor(COLOR_3DFACE)); apGroup3->AddSubItem(pColorProp); static TCHAR BASED_CODE szFilter[] = _T("Icon Files(*.ico)|*.ico|All Files(*.*)|*.*||"); apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Icon"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("Specifies the dialog icon"))); apGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("Folder"), _T("c:\\"))); m_wndPropList.AddProperty(apGroup3.release()); std::auto_ptr<CMFCPropertyGridProperty> apGroup4(new CMFCPropertyGridProperty(_T("Hierarchy"))); CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("First sub-level")); apGroup4->AddSubItem(pGroup41); CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("Second sub-level")); pGroup41->AddSubItem(pGroup411); pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 1"), (_variant_t) _T("Value 1"), _T("This is a description"))); pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 2"), (_variant_t) _T("Value 2"), _T("This is a description"))); pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("Item 3"), (_variant_t) _T("Value 3"), _T("This is a description"))); apGroup4->Expand(FALSE); m_wndPropList.AddProperty(apGroup4.release()); }