FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Are there any Treeview samples with associated edit boxes?
Posts: 668
Joined: Fri Oct 21, 2005 05:54 AM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Tue Jun 30, 2026 03:38 PM

Dear Antonio,

I am trying to incorporate 'PIM.PRG' in my application.
Some parts of the PIM.PRG are not working when I add PIM
in my main project. But as a independent sample, it is working
fine.

The following oTree:bChanged line is not working at all:

oTree:bChanged = { | oItem | oItem := oTree:GetSelected(),;
if( oItem != nil, ;
if( !Empty( oItem:Cargo ), ;
oMemo:LoadRTF( oItem:Cargo, !oMemo:IsTextRtf( oItem:Cargo ) ), ;
oMemo:SetText( "" ) ), oMemo:SetText( "" ) ) }

and also I am not able to edited the text of a node with the following function:

function TreeEditItem( oTree )

local oItem := oTree:GetSelected()

if oItem != nil
PostMessage( oTree:hWnd, TVM_EDITLABEL, 0, oItem:hItem )
endif

return nil

I don't know why it is not working when I include pim in my project.
Please advise me.

Regards,

-Ramesh Babu

Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Tue Jun 30, 2026 03:43 PM

Dear Ramesh,

pim.prg uses a manifest file from pim.rc

Does your app use a manifest too ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 668
Joined: Fri Oct 21, 2005 05:54 AM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Tue Jun 30, 2026 11:15 PM

Dear Antonio,

Thank you for your attention.

Does your app use a manifest too ?

Yes. 1 24 "WindowsXP.Manifest"

Ragards,

-Ramesh Babu

Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Wed Jul 01, 2026 04:32 AM

Dear Ramesh,

Are you using a main MDI window ?

Are you using FW_SetUnicode( .T. ) in your app ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Wed Jul 01, 2026 05:51 AM

Fixed:

  • Fix: TreeView SelChanged not firing in Unicode mode (source\classes\window.prg,
    source\ceclasses\window.prg):
    When FW_SetUnicode(.T.) is active, the TreeView control sends TVN_SELCHANGEDW
    (-456) instead of TVN_SELCHANGEDA (-402). The Notify() handler only matched
    the ANSI code, so bChanged callbacks never fired in Unicode mode. Fixed: add
    TVN_SELCHANGEDW to the case condition alongside TVN_SELCHANGEDA.
 #define TVN_SELCHANGEDA  -402  // CommCtrl TreeView notification
+#define TVN_SELCHANGEDW  -456  // CommCtrl TreeView notification (Unicode)

-         case nCode == 103 .or. nCode == TVN_SELCHANGEDA  // TreeView item selected
+         case nCode == 103 .or. nCode == TVN_SELCHANGEDA .or. nCode == TVN_SELCHANGEDW  // TreeView item selected
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 668
Joined: Fri Oct 21, 2005 05:54 AM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Wed Jul 01, 2026 07:29 AM

Dear Antonio,
Thank you very much for your support.
I will test and let you know the result.

Temporarily I commented out FW_SetUnicode(.T.) .
before your new post and the text attached to the nodes are properly displaying.

With your suggested changes, editing node text will work?

Regards,

  • Ramesh Babu
Posts: 44508
Joined: Thu Oct 06, 2005 05:47 PM

Re: Are there any Treeview samples with associated edit boxes?

Posted: Wed Jul 01, 2026 08:30 AM

Yes, they should work

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion