Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - [SOLVED] 16.1 Tree Control lines not visible
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] 16.1 Tree Control lines not visible

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] 16.1 Tree Control lines not visible
    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


Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2013 at 3:07am
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.


Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2013 at 10:13am
Hello, this has been fixed for the next release.

Codejock support
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 24 May 2013 at 12:38pm
Great Smile !
Thanks.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 19 June 2013 at 2:55pm
16.2
Back to Top
MrFelix View Drop Down
Newbie
Newbie


Joined: 20 June 2013
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrFelix Quote  Post ReplyReply Direct Link To This Post Posted: 20 June 2013 at 7:49am
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.
Back to Top
prekopj View Drop Down
Newbie
Newbie
Avatar

Joined: 02 November 2011
Location: Slovak Republic
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote prekopj Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2013 at 5:59am
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:


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.