Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CTreeCtrl with DockPaneDlg
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CTreeCtrl with DockPaneDlg

 Post Reply Post Reply
Author
Message
devam View Drop Down
Groupie
Groupie
Avatar

Joined: 20 March 2008
Location: India
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote devam Quote  Post ReplyReply Direct Link To This Post Topic: CTreeCtrl with DockPaneDlg
    Posted: 20 March 2008 at 5:34am
I have a docking pane to which I am attaching a dialog. The dialog is derived from CXTResizeDialog. I am creating a CTreeCtrl statically through the resource view within the dialog. OnInit dialog initializes the tree control.
But the problem is that whenever i call a setcheck() API to check the items in the tree, the checkmark is not visible on the GUI. calling getcheck() on the same tree item returns 1, which indicates that it is checked, but the checkmark is not visible on the GUI.
Can anyone help me in this regard? Is there any GUI related issues with a dockingpane dialog and a tree control?
DC
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2008 at 8:23am

Hi,

There is one bug in standard TreeCtrl. All Check Marks will be reset after first drawing of Tree Control.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
devam View Drop Down
Groupie
Groupie
Avatar

Joined: 20 March 2008
Location: India
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote devam Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2008 at 9:22am
The CtreeCtrl behaves perfectly when it is created at runtime (dynamically)on a CXTPTaskPanel, but when i put it on a dockpane dialog, the checkmarks are not visible when the window comes up for the first time.
If I close the dock pane (from the GUI) and then display the dockpane dialog again, then the tree comes up with the checkmarks visible!
I am using Xtreme ToolkitPor version 9.8
Is there any work-around applicable for this? Or is it that it just cannot be done?
DC
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2008 at 11:58am

I just wrote reason...

Workaround is don't set TVS_CHECKBOXES in OnCreate but call
 
m_wndTree.ModifyStyle(0, TVS_CHECKBOXES ); before you set Check Marks.
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
devam View Drop Down
Groupie
Groupie
Avatar

Joined: 20 March 2008
Location: India
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote devam Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2008 at 2:00pm
Thank you for all the help. It worked!!!
DC
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.