-1

I have Property Grid Control in which i have to add different controls in each of the rows, like Combo box, Browse option, Radio option etc. I am using CMFCPropertyGridProperty class to add the string to this controls

Andrew Komiagin
  • 6,446
  • 1
  • 13
  • 23
Sandeep Kumar
  • 85
  • 1
  • 3
  • 10

1 Answers1

1

Simply use CMFCPropertyGridProperty::AddOption() to add options. The set of options is internally implemented based on Combo Box.

If you'd like to add file/folder browse options you have to do the following:

// A folder browse dialog property
CMFCPropertyGridFileProperty* pFolderProp = new CMFCPropertyGridFileProperty(_T("Select folder"), _T("C:\\Windows"));
m_PropGridCtrl.AddSubItem( pFolderProp );

// A file open dialog property
CMFCPropertyGridFileProperty* pFileProp = new CMFCPropertyGridFileProperty(_T("Select file"), TRUE, _T("C:\\Windows"));
m_PropGridCtrl.AddSubItem( pFileProp );
Andrew Komiagin
  • 6,446
  • 1
  • 13
  • 23
  • I am able to add the Combo and the Browse options but couldn't find adding a check box. Any suggestions ? Thanks – Sandeep Kumar Oct 25 '16 at 06:28
  • You have to implement it yourself. https://social.msdn.microsoft.com/Forums/de-DE/4043c308-f57a-48c4-acb8-2c9de93f429a/cmfcpropertygridproperty-lokalisierung?forum=visualcplusde – Andrew Komiagin Oct 25 '16 at 07:58