FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posts: 42
Joined: Fri Oct 21, 2005 02:12 PM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Sat Nov 26, 2005 02:05 PM
Hello

I try to include a TreeView inside a dialog that included in a 32bits Dll. The problem i faced is when ctivate the dialog i get an empty TreeView window. The treeview declared as "SysTreeView32" in the dialog as the manual says.

#include "FiveWin.ch"

STATIC TEstDlg,Tree

PROCEDURE MAIN()

LOCAL ImageList
LOCAL Brance1,Brance2,Brance3


SET RESOURCES TO "TEST32.DLL" // Here is the TreeView Dialog


 
DEFINE DIALOG TestDlg RESOURCE "TEST" 

   
  
   ImageList := TImageList():New()
      ImageList:Add( TBitmap():Define( "DISCOUNT",,TestDlg))
      ImageList:Add( TBitMap():Define( "MONEY",,TestDlg))
      ImageList:Add( TBitMap():Define( "TACK",,TestDlg))
      ImageList:Add( TBitMap():Define( "TACKED",,TestDlg))
      
      Tree = TTreeView():Redefine (4001,TestDlg)
     
     WITH OBJECT Tree
      :SetImageList( ImageList)
       Brance1:= :Add( "THIS IS THE FIRST",0)
         Brance1:Add("This is an Item inside the 1st Brance",0)
       Brance2:= :Add( "THIS IS THE SECOND",1)
       Branc3:=  :Add( "This is the THIRD",2)
     END WITH 
   
   ACTIVATE DIALOG TestDlg CENTERED


This code as a result gives the dialog with 2 buttons and an empty TreeView window.

Any help would be appreciate.

Thanks In Advance
Dionisis
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Sat Nov 26, 2005 05:00 PM

Dionisis,

On a dialog, a control does not really exists until the dialog is activated, so please modify the code this way:

ACTIVATE DIALOG TestDlg CENTERED ;
ON INIT FillTree( oTree, ImageList )

function FillTree( Tree, ImageList )

local Brance...

 WITH OBJECT Tree 
  :SetImageList( ImageList) 
   Brance1:= :Add( "THIS IS THE FIRST",0) 
     Brance1:Add("This is an Item inside the 1st Brance",0) 
   Brance2:= :Add( "THIS IS THE SECOND",1) 
   Branc3:=  :Add( "This is the THIRD",2) 
 END WITH

return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 42
Joined: Fri Oct 21, 2005 02:12 PM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Sun Nov 27, 2005 06:32 AM

Antonio

Many many thanks this change make the code to work. For once again you gave me a valued help.

Greetings from Greece

Dionisis

:lol:

Posts: 28
Joined: Tue Nov 15, 2005 01:03 AM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Fri Dec 02, 2005 02:48 PM

Hi Sakis

This code seems to be works for you. I understand you have the SysTreeView32 control defined in a DLL. Could you tell me in the DLL how the control was defined?

I've defined in this way

CONTROL "", 1007, "SysTreeView32", WS_CHILD | WS_VISIBLE | WS_BORDER, 12, 72, 206, 100

But I can't see the lines neither the (+)(-) signs even the rest works fine

Thanks

Posts: 42
Joined: Fri Oct 21, 2005 02:12 PM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Fri Dec 02, 2005 03:02 PM
Hi wpacheco

Sorry but i use the pellesc IDE and i get the resources directly into the DLL. So i can't answer to your question because I dont use any RC file . Others advantages to use this IDE is to let you assign other control characteristics like HasButtons HasLines etc.etc.

This is very easy and quick way to make your 32 resources DLL's.

Here is a link to see more


http://www.smorgasbordet.com/pellesc/

Greetings
Dionisis
Posts: 28
Joined: Tue Nov 15, 2005 01:03 AM
To ANTONIO :Help on TtreeView Class PLEASE URGENT !!!!
Posted: Fri Dec 02, 2005 11:46 PM

Thanks Sakis. I will try :wink:

Continue the discussion