Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Embedding CCJTreectrl in CTreeView
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Embedding CCJTreectrl in CTreeView

 Post Reply Post Reply
Author
Message
huw.edwards View Drop Down
Newbie
Newbie


Joined: 06 January 2004
Location: United Kingdom
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote huw.edwards Quote  Post ReplyReply Direct Link To This Post Topic: Embedding CCJTreectrl in CTreeView
    Posted: 06 January 2004 at 5:58am

Hi

Has anyone tried using the treectrl in a ctreeview (or is this stupid?)

I can use the CJ tree ctlr in my treeview with

 CCJTreeCtrl* m_pTreeCtrl = (CCJTreeCtrl*) &GetTreeCtrl();

and it works fine until I try to use the extra functionality with

 m_pTreeCtrl->EnableMultiSelect(TRUE);

at that point I get :
File: i386\chkesp.c
Line: 42
The value of ESP was not properly saved across a function call. [..]

I've tried switching to different calling conventions (__stdcall, __cdecl) with no effect.

Is it possible to embed a CJ tree ctrl in a tree view ?

Thanks Huw

 

 

 

Back to Top
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2004 at 2:23pm

I reinstalled my OS, VC 6.0, Xtreme Toolkit 8.61 Pro, Platform SDK.  I did a rebuild all on my program.  I ran my program and got a similar error.

On another machine, I don't get the error...not sure why, but the answer is in the differences.

If I find out what is causing this, I'll let you know. 

 

Back to Top
thodgson View Drop Down
Groupie
Groupie


Joined: 11 August 2003
Status: Offline
Points: 78
Post Options Post Options   Thanks (0) Thanks(0)   Quote thodgson Quote  Post ReplyReply Direct Link To This Post Posted: 02 April 2004 at 8:02am

Okay.  In my particular case, I had copied the XT Pro dll from one machine to another and tried to run my program using that dll (wrong).  I instead copied the dll which was built on the same machine, to my program's bin directory, ran the program, and the error went away.

Hopefully this information will help you in some way.

Tim

Back to Top
spike View Drop Down
Groupie
Groupie


Joined: 13 May 2003
Location: United States
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote spike Quote  Post ReplyReply Direct Link To This Post Posted: 12 April 2004 at 6:44pm

This breaks the laws of C++. The object would have to be allocated as a "CCJTreeCtrl" in order to call methods that are *in* "CCJTreeCtrl".

All you have done is cast a CTreeCtrl* to a CCJTreeCtrl, that does not automatically give you access to everything in CCJTreeCtrl.

I would suggest you use CXTTreeView. 

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.125 seconds.