[SOLVED] 16.1 Tree Control lines not visible |
Post Reply |
Author | |
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
Posted: 04 May 2013 at 4:01am |
After migrating to version 16.1 of Toolkit Pro, tree controls based on CXTPTreeCtrl don't show any lines, even if the TVS_HASLINES and TVS_LINESATROOT are set in the resource or the derived class.
I see this behavior in my app, and also, for example, in the CodeJock Tree Control Sample. Sometimes, when clicking in the tree where the [+] icon usually is, the [+] icon shows up, but the next tree redraw hides them again. Lines are never shown. Platform: Visual C++ 2012, Windows 7 SP1, 32-Bit. XTP 16.1 |
|
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
|
Some further info.
In XTPTreeBase.cpp is an ominous global variable static BOOL g_bDefaultIconsDrawing = FALSE; when I set this to TRUE in the debugger, the DoPaint method of the XTPCotnrol calls m_pTreeCtrl->DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0); and the [+] and [-] icons and the tree lines are back!!! Has anything changed with the way we need to initialize tree controls in 16.1? Some new 'Theme' method we must call or anything to make this work. Since this also fails in your samples, can you please have a look. We need to ship our product and we need to decide whether or not be ship XTP 16 or the older version. |
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hello, this has been fixed for the next release.
|
|
Codejock support
|
|
MacW
Senior Member Joined: 26 June 2007 Status: Offline Points: 253 |
Post Options
Thanks(0)
|
Great !
Thanks. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
16.2
|
|
MrFelix
Newbie Joined: 20 June 2013 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Sorry guys, tested a few minutes ago with latest 16.2.0, the problem is still present. Only calling CXTPTreeBase::DoPaint with bInternal == FALSE shows the lines. Your code does not handle TVS_HASLINES or TVS_LINESATROOT. Either handle and draw it or call the default window procedure.
I'll try to get a solution for me comparing to the sources of 15.3.1 until this problem is fixed within a future release of the toolkit. |
|
prekopj
Newbie Joined: 02 November 2011 Location: Slovak Republic Status: Offline Points: 4 |
Post Options
Thanks(0)
|
I compared source code for version 15.3.1 and 16.2.0.
I made one change - file XTPTreeBase.cpp on line 1054: m_pTreeCtrl->DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0); // Now let the window do its default painting... if (!bInternal) { //m_pTreeCtrl->DefWindowProc(WM_PAINT, (WPARAM)memDC.m_hDC, 0); return; } and result: |
|
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 |