Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » Where can I store 32 bit data
Where can I store 32 bit data [message #4822] Wed, 23 August 2006 04:56 Go to next message
unknown user
It looks teectrl Item doesn't have a var to store 32 bit data like Window's HTREEITEM'S LPARAM.
Re: Where can I store 32 bit data [message #4823 is a reply to message #4822] Wed, 23 August 2006 08:23 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 576
Registered: December 2005
Location: Budapest, Hungary
Contributor
I'm using it to store 32 bit integers, but you can store anything in Value. See this page:
http://upp.sourceforge.net/srcdoc$Core$UserValue$en-us.html
Re: Where can I store 32 bit data [message #4824 is a reply to message #4823] Wed, 23 August 2006 09:05 Go to previous messageGo to next message
unknown user
zsolt wrote on Wed, 23 August 2006 02:23

I'm using it to store 32 bit integers, but you can store anything in Value. See this page:
http://upp.sourceforge.net/srcdoc$Core$UserValue$en-us.html

it's a little hard to understand
Re: Where can I store 32 bit data [message #4826 is a reply to message #4824] Wed, 23 August 2006 10:44 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Contributor
Administrator
hongdong wrote on Wed, 23 August 2006 08:05

zsolt wrote on Wed, 23 August 2006 02:23

I'm using it to store 32 bit integers, but you can store anything in Value. See this page:
http://upp.sourceforge.net/srcdoc$Core$UserValue$en-us.html

it's a little hard to understand


Please, post your minimal code sample.
Re: Where can I store 32 bit data [message #4833 is a reply to message #4826] Wed, 23 August 2006 11:38 Go to previous messageGo to next message
unknown user
fudadmin wrote on Wed, 23 August 2006 04:44

hongdong wrote on Wed, 23 August 2006 08:05

zsolt wrote on Wed, 23 August 2006 02:23

I'm using it to store 32 bit integers, but you can store anything in Value. See this page:
http://upp.sourceforge.net/srcdoc$Core$UserValue$en-us.html

it's a little hard to understand


Please, post your minimal code sample.


sorry,not ready yet,I used LPARA to store database record id in my MFC code,so I would to do the same thing in U++,but I found U++ TreeCtrl doesn't have such kind of variable.
btw,after I played with U++ a day,I really like it now,I create a simple GUI,build with MingW,optimized for size,upx the exe file,finally the size is 537kb.attach is the screenshot

if I didn't try,I never know U++ is so good!!!
  • Attachment: Netpath.PNG
    (Size: 36.08KB, Downloaded 2214 times)
Re: Where can I store 32 bit data [message #4835 is a reply to message #4833] Wed, 23 August 2006 12:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
Instead of LPARAM, in U++ you can associate TWO Values with each tree item.

First one is just stored (key). You can retrieve it later (e.g. for active item).

Second one is displayed in TreeCtrl. You can even define HOW it is displayed using the Display class.

You can directly store virtually any concrete type to the Value and you can make your own types "Value-compatible". Some of U++ Value-compatible types are String, int, double, int64, bool, Image, Color, Font, Drawing, Date, Time....

Mirek
Re: Where can I store 32 bit data [message #4837 is a reply to message #4835] Wed, 23 August 2006 12:08 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
P.S.: Looking at the image you posted

- looks like U++ is able to support chinesse in the end Smile

- you are using 605 version ("stable"). There are many improvements in current "dev" version, maybe you could try it in parallel.

Mirek
Re: Where can I store 32 bit data [message #4859 is a reply to message #4835] Wed, 23 August 2006 16:57 Go to previous message
unknown user
luzr wrote on Wed, 23 August 2006 06:06

Instead of LPARAM, in U++ you can associate TWO Values with each tree item.

First one is just stored (key). You can retrieve it later (e.g. for active item).

Second one is displayed in TreeCtrl. You can even define HOW it is displayed using the Display class.

You can directly store virtually any concrete type to the Value and you can make your own types "Value-compatible". Some of U++ Value-compatible types are String, int, double, int64, bool, Image, Color, Font, Drawing, Date, Time....

Mirek



thanks for your explanation,I will try when ready.
Previous Topic: Missing callback trigger in OptionTree? [SOLVED/FIXED]
Next Topic: A Rest Topic:how many tree items you can have
Goto Forum:
  


Current Time: Sat Feb 16 17:22:46 CET 2019

Total time taken to generate the page: 0.01152 seconds