Click here to Skip to main content
15,888,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: sort million input Pin
enhzflep18-May-15 2:40
enhzflep18-May-15 2:40 
QuestionDrive Start Sector using WMI services Pin
john563215-May-15 20:39
john563215-May-15 20:39 
AnswerRe: Drive Start Sector using WMI services Pin
Frankie-C17-May-15 0:46
Frankie-C17-May-15 0:46 
QuestionDialogBox Create Fails Pin
ForNow15-May-15 5:33
ForNow15-May-15 5:33 
QuestionRe: DialogBox Create Fails Pin
David Crow15-May-15 6:01
David Crow15-May-15 6:01 
AnswerRe: DialogBox Create Fails Pin
ForNow15-May-15 6:15
ForNow15-May-15 6:15 
AnswerRe: DialogBox Create Fails Pin
Richard MacCutchan15-May-15 22:25
mveRichard MacCutchan15-May-15 22:25 
QuestionProperty Grid alignment issue with sub-group Pin
Maximilien15-May-15 4:16
Maximilien15-May-15 4:16 
I am creating a simple property grid (CMFCPropertyGridCtrl) containing sub groups (value list)

There is a alignment issue for the sub groups where the labels are drawn with a left offset (see in particular the "Level2" label)

Why is the "Level2" label not aligned the same was as the "Level1" label?
I would imagine that it should be aligned at the same level as the "subLevel1" label.

See screenshot : http://imgur.com/9JeC4iz

Here is how I code the property grid:
CMFCPropertyGridProperty* level1Group = new CMFCPropertyGridProperty(_T("Level1"), 0, TRUE );
CMFCPropertyGridProperty* subLevel1 = new CMFCPropertyGridProperty(_T("subLevel1"), _T("subLevel1"), _T("subLevel1") );
level1Group->AddSubItem(subLevel1);

CMFCPropertyGridProperty* level2Group = new CMFCPropertyGridProperty(_T("Level2"), 0, TRUE );
CMFCPropertyGridProperty* subLevel21 = new CMFCPropertyGridProperty(_T("SubLevel2.1"), _T("SubLevel2.1"), _T("SubLevel2.1") );
CMFCPropertyGridProperty* subLevel22= new CMFCPropertyGridProperty(_T("SubLevel2.2"), _T("SubLevel2.2"), _T("SubLevel2.2") );
CMFCPropertyGridProperty* subLevel23 = new CMFCPropertyGridProperty(_T("SubLevel2.3"), _T("SubLevel2.3"), _T("SubLevel2.3") );

level2Group->AddSubItem(subLevel21);
level2Group->AddSubItem(subLevel22);
level2Group->AddSubItem(subLevel23);
level1Group->AddSubItem(level2Group);
m_PropertyGrid.AddProperty(level1Group);

I tried inheriting my own CMFCPropertyGridProperty class and overwrite the OnDrawName but because of many protected members in the base class. (see CMFCPropertyGridProperty::OnDrawName in afxpropertygridctrl.cpp )

Now, I did overwrite the OnDrawName method, but removed lot of code that was in the base method that did not compile (access to protected members); but it seems to be OK.

Thanks.

Max.
I'd rather be phishing!

QuestionAn analog switch, but more efficient Pin
Vladimi_r215-May-15 4:15
Vladimi_r215-May-15 4:15 
AnswerRe: An analog switch, but more efficient Pin
jeron115-May-15 5:06
jeron115-May-15 5:06 
QuestionCalculating average in a high priority thread Pin
Member 935023714-May-15 23:18
Member 935023714-May-15 23:18 
GeneralRe: Calculating average in a high priority thread Pin
Jochen Arndt14-May-15 23:27
professionalJochen Arndt14-May-15 23:27 
GeneralRe: Calculating average in a high priority thread Pin
Member 935023714-May-15 23:36
Member 935023714-May-15 23:36 
GeneralRe: Calculating average in a high priority thread Pin
Jochen Arndt14-May-15 23:42
professionalJochen Arndt14-May-15 23:42 
GeneralRe: Calculating average in a high priority thread Pin
Member 935023715-May-15 0:19
Member 935023715-May-15 0:19 
GeneralRe: Calculating average in a high priority thread Pin
Jochen Arndt15-May-15 0:53
professionalJochen Arndt15-May-15 0:53 
QuestionException in code C Pin
Member 1169244814-May-15 21:33
Member 1169244814-May-15 21:33 
SuggestionRe: Exception in code C Pin
Richard MacCutchan14-May-15 22:35
mveRichard MacCutchan14-May-15 22:35 
GeneralRe: Exception in code C Pin
Member 1169244814-May-15 22:59
Member 1169244814-May-15 22:59 
GeneralRe: Exception in code C Pin
Richard MacCutchan15-May-15 2:53
mveRichard MacCutchan15-May-15 2:53 
SuggestionRe: Exception in code C Pin
David Crow15-May-15 2:13
David Crow15-May-15 2:13 
GeneralRe: Exception in code C Pin
Philippe Mori16-May-15 2:45
Philippe Mori16-May-15 2:45 
AnswerRe: Exception in code C Pin
Philippe Mori16-May-15 2:41
Philippe Mori16-May-15 2:41 
QuestionCopy Text from dialog box Pin
Thakur JAI SINGH13-May-15 23:31
Thakur JAI SINGH13-May-15 23:31 
AnswerRe: Copy Text from dialog box Pin
Richard MacCutchan14-May-15 1:22
mveRichard MacCutchan14-May-15 1:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.