Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CTreeCtrl EditLabel

56 views
Skip to first unread message

cliff....@gmail.com

unread,
Nov 3, 2006, 12:01:28 PM11/3/06
to
Ok here is the problem. I have created an owner drawn tree
(CCheckTree). Each node in the tree has a check box beside it. I have
derived (CEditableCheckTree) from (CCheckTree). CEditableCheckTree has
the edit labels style. When I call the EditLabel function the edit
control shows up but when I left click in the edit control the caret
isn't placed in the control, I can't select the text, or type into the
control. I can right click and paste into the control, but that is just
about all. Also if I call the edit control's SetFocus function it never
receives focus. I know that I'm overlooking something, but I've been
working on this for four days and have no clue what is going on.

AliR (VC++ MVP)

unread,
Nov 3, 2006, 12:16:58 PM11/3/06
to
It might have something to do with from where you are calling EditLabel.
Does it do the same thing when you get the label in edit mode by just
clicking on the item?

AliR.

<cliff....@gmail.com> wrote in message
news:1162573287.9...@i42g2000cwa.googlegroups.com...

cliff....@gmail.com

unread,
Nov 3, 2006, 12:27:34 PM11/3/06
to
Yes. I can click a node, pause, then click again and the edit shows up
but acts the same way.

AliR (VC++ MVP)

unread,
Nov 3, 2006, 12:29:22 PM11/3/06
to
Then in that case there must be something in the code in those classes.
What are some of the things that the CTreeCtrl derived classes doing?

AliR.

<cliff....@gmail.com> wrote in message
news:1162574853.8...@h54g2000cwb.googlegroups.com...

cliff....@gmail.com

unread,
Nov 3, 2006, 5:14:19 PM11/3/06
to

Don't worry about it, I've been searching and debugging for four days.
I just finished writing my own version of the CEdit. It isn't practical
I know, but it works. Sometimes I really really hate MFC (Matter of
fact I think I've heard that it stands for "MotherF****** Crap")

Dan Bloomquist

unread,
Nov 3, 2006, 9:47:25 PM11/3/06
to

cliff....@gmail.com wrote:

Why are you blaming MFC for the way common controls work? MFC is an
application framework, a c++ API wrapper, nothing more.

Best, Dan.

Cliff

unread,
Nov 6, 2006, 9:50:44 AM11/6/06
to

Dan Bloomquist wrote:
> Why are you blaming MFC for the way common controls work? MFC is an
> application framework, a c++ API wrapper, nothing more.
>
> Best, Dan.

You're right, I was very irritated about the entire situation. When
you've spent nearly a week trying to type into an edit control you
start to go crazy. Anyway I've had a weekend to calm down and I'm just
accepting the fact that I can't figure out what is wrong with the edit
control and am just going to continue using the one that I wrote until,
one day, the light bulb finally comes on and I see what the problem is.

Thanks for all the help.

Joseph M. Newcomer

unread,
Nov 6, 2006, 9:16:34 PM11/6/06
to
Also, check out KB article 167960. I can;t tell if the revision fixes the numerous bugs I
found in the original, but if this article seems relevant send me private email and I can
send you a working version of the code.

joe

Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

0 new messages