Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtPropertyGridCtrl for 1 million objects Collapse All
Subject Author Date
Alexander Kool Dec 11, 2006 - 9:45 AM

Dear Sirs,

In my drawing program, I have upto a million objects for which properties must be set/handled.
The CExtPropertyGridCtrl implementation requires a CExtPropertyStore for each object.
This will exploded my memory allocation enormeously.
Is it possible to work with 1 CExtPropertyStore per object type (line, arc, rect etc)?
How would you go about to implement this?

Best regards,
A.J. Kool

Alexander Kool Dec 11, 2006 - 4:17 PM

1. But will it then still show the value if multiple objects properties have the same value?
2. Can I make a (static) store for lines, another for rectangles etc. ?
3. Do you have an example or code snippet? I cannot find much documentation on the actual function of the classes themselves.

Thanks. A.J. Kool

Technical Support Dec 13, 2006 - 5:42 AM

Analyzing one million objects having only one propery each is not a good idea. It is hardly possible to code this using a for( i=0; i < 1000*1000; i++ ) loop. If the objects are stored in a database, you should build some specific queries which returns a temporary data table that can be used for initializing the grid. In any case, you will have to write a custom property grid with 50% functionality rewritten for your specific task. In other words, you will have to rewrite the code for mixing values and it will not be based on the code for mixing property stores provided in Prof-UIS. In fact, the property grid should not display property values of one million objects but rather some data which emulates a look of displaying the properties of one million objects.

Technical Support Dec 11, 2006 - 12:19 PM

You can use one property store only. If you need to display some property values as having different actual values in different objects, then you should apply the __EGCS_EX_UNDEFINED_ROLE extended grid cell style to the active grid cell stored inside the CExtPropertyValue object. In the property grid, such a cell will contain an empty text area until the user edit it.