![]() |
XTPPropertyGrid inside CPropertyPage |
Post Reply ![]() |
Author | |
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() Posted: 19 July 2007 at 6:42pm |
Embedding a XTPropertyGrid using Create(...) makes the following problems:
1. split-bar between top part and help text at the bottom is in BTNFACE not background image of the CTabCtrl
2. background color of the bottom help part is BTNFACE
3. Since it gets added to the dialog as a window drawn over the dialog, it is not added to the tab order of the dialog control items so you cannot tab to the control.
Ideally it would be good to be able to put a XTPPropertyGrid onto a dialog using DDX_Control(...) instead of using Create... is this possible?
Adrien
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Yes you can - add in dialog custom control with class "XTPPropertyGrid"
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
OK that works for adding it thanks! Still have a problem with background colors on skins though possibly in CXTPPropertyGrid::OnInvertTracker() it looks very odd on Le5 scheme.
the reason it looks odd is because there are individual borders round the grid and the help area, so no delineation between the background and the splitter area, but you get a change in color.
![]() |
|
![]() |
|
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
doesn't look like this would be easy to solve.
I tried it so we don't draw solid rect for backgrounds, but then the background becomes black, since we are drawing into a new memDC, so I modified also the CXTPBufferDC::CXTPBufferDC call to add
::BitBlt(m_hDC, 0,0, m_rect.right, m_rect.bottom, hDestDC, 0, 0, SRCCOPY);
then we just draw over the top of what was behind the control. This looks great until you resize or change text in the help area - need to invalidate the parent window to re-draw the background.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello,
Yes its designed, we will add m_bTransparent flag for next release.
You can patch CXTPPropertyGridPaintManager::FillPropertyGrid now
{ CXTPClientRect rc(m_pGrid);
HBRUSH hBrush = NULL;
if (m_bTransparent)
{ hBrush = (HBRUSH)m_pGrid->GetParent()->SendMessage(WM_CTLCOLORSTATIC, (WPARAM)pDC->GetSafeHdc(), (LPARAM)m_pGrid->m_hWnd); } if (hBrush) { ::FillRect(pDC->GetSafeHdc(), rc, hBrush); } else { pDC->FillSolidRect(rc, m_clrFace); } ....
}
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
I'll try that - can a HBRUSH be used to draw a background bitmap?
|
|
![]() |
|
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
ps, if there is a background bitmap, won't that FillRect get the offset wrong, and start at the beginning of the bitmap pattern? That won't align with the background bitmap of the parent.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |