CTreeCtrl Custom Draw for additional States - visual-c++

My need is to have about 30 states fro the Tree Items and as per the limitation CTreeCtrl will not support not more than 15 States.
From lots of stackoverflow browsing I found that I need to write a Custom Draw on the Custom CTreeCtrl.
Can anyone suggest me a good link/demo code for implementing the Custom Draw for the additional States.
Thanks in advance :)

Codeproject has a bunch of code about this.
http://www.codeproject.com/Articles/325/A-custom-drawn-TreeList-Control
States are not everything: It depends on how may symbols you need...
Merge states and symbols into the needed permutations.
You can create your own CImageList and use drawing icons to create the mixed symbols.

Related

Visio Process-Diagram connected/embeded to detailed Narrative

How can I add a lot more details to each process step of a Visio process diagram e.g. an (Excel) table?
For all kind of purposes I have to draw process diagrams. Visio is one of the best tools I know in this direction, but it lacks (or I don't know), if (a lot) more details should be added to a process step.
I've asked countless people about the best approach, but till now I only heard about the following, and non of them is really good:
Use index numbers for process steps and then embed the Visio process diagram into word. Reference the process steps by index number and describe it in detail. (disadvantage: having multiple documents, if changes are made changes need to be reflected in multiple documents what is time-consuming).
Don't use Visio at all and draw a process diagram in Excel. Excel is perfect for adding a description to a simpler diagram, right next to the process steps. (disadvantage: only possible for simpler workflow diagrams, Excel is not a process drawing tool)
Link process steps to other sub-process diagrams. (disadvantage: everything is spread into a lot areas and a detail grade of a table is still not really possible to attach it)
I can't believe in the year 2017 this is still a problem and hundert of thousands of people must have this challenge, so I'm quite sure I must be overlooking something.
Is it for example possible to embed an Excel diagram into a Visio document and link from the process steps to a specific row of this table (auto-referencing/-sorting in the best case)? If this is the best practice how to print this on paper after creation?
A research on the web shows me I'm not alone and people doing all kind of hacks to get it done, but none of these looks is looking very practical. In the worst case I can live with a solution which is basically only working in a digital document and I can print it separately in two steps.
Any help would be very welcome because it really bugs me to struggle over this simple barrier my feeling tells me that there must be a much better solution and I'm overlooking something. I'm also willing to use another tool than Visio if this is possible with it in a practical way.
As often, as soon as posted (after long research) I found a possible approach:
MS Blog: https://blogs.office.com/en-us/2017/05/01/automatically-create-process-diagrams-in-visio-from-excel-data/?eu=true
Alternate Description: http://www.free-power-point-templates.com/articles/how-to-automatically-create-process-diagrams-in-visio-using-excel-data/
Youtube Video-Tutorial: https://www.youtube.com/watch?v=Q6_vop2kHCg
Alternate (Visio only) approach: https://www.youtube.com/watch?v=432EvYZs26Y
I'm still more than open to better ideas and approaches. If there is a simpler better way todo it, please post it here. It would be also interesting to go the Excel/Visio route in the opposite direction. Manage all data in Visio and beeing apple to export it excel in a nice way.
Bonus (adding/connecting Data/Excel to a Visio Diagram): https://www.youtube.com/watch?v=gxYu78sOxSY

GetOrgChart - Mixed orientation in the same orgchart

I've been playing around with GetOrgChart and have read all the demo html files on how to personalize the chart, as well as all the the documentation on the 8 types of orientations. But, I was unable to accomplish what I am after.
What I believe I need to do is to use 2 types of orientations in the same OrgChart as in my company, we have more than 230 people under 3 directors. If I only expand to the 2nd level, the organisation chart is impossible to read as a result. So to fix it, I want to have all the odd numbered levels in one type of orientation, or something similar to that:
http://www.basicprimitives.com/index.php?option=com_content&view=article&id=78&Itemid=122&lang=en
Is what I am saying even possible with GetOrgChart? If so, please explain how it can be done.
Apologies if my English isn't great.
Actually GetORgChart supports mixed Hierarchy
Here is the demo: http://www.getorgchart.com/Demos/Mixed-Hierarchy

Newb: WPF custom graphic control - where to start

Apologies if there is a thread for this already, I couldn't find one that I could get my teeth into.
Anyway, I'm new to WPF and want to create a custom control that will be a sort of graphic control. The graphic will always consist of a circle, containing a matrix of several squares (from several hundred to several thousand actually) The squares need to respond to mouse click and mouse over events (and ideally be possible to navigate/select via keyboard.) Each square will represent an object I've coded.
In the past I've used a grid control to display the coloured squares (with VCL in CBuilder) but I would like to make a graphical version. (Actually, another question I'd like to ask is, is there a WPF grid control where I can set the colours of individual cells?)
The question is, where to start? Do I start with a canvas and draw on it? Do I derive from an existing object? I'm just a little lacking on ideas on implementation so any pointers or advice you can offer will be greatly received.
BBz
First off I would suggest getting a decent handle on WPF and how it approaches the problem set. It is vastly different from previous .NET Desktop technologies such as WinForms. Once you have a decent understanding in regards to the separation of logic from UI and how WPF approaches the problem then you can dive in and begin making the right decisions based upon what you encounter.
The problem you mention can be solved in multiple ways. In regards to your question about making use of a Grid, that could be done as that is a layout type. It is vastly superior to the Canvas in terms of arranging your visual structure. The defined rows/columns are nothing more then containers which can hold varying UI objects. Therefore pushing a Rectangle into the Grid and coloring as desired would give you the effect you are looking for. This Rectangle could then become a custom control which would allow you to define varying properties on, as well as specific triggers for mouse overs, etc...
At a higher level you will want to encapsulate this logic as a UserControl which will also hold your custom control. Perhaps the UserControl contains the Grid which will make use of your custom control.
Hopefully this gives you some ideas around how to get started, however getting a better understanding of WPF will help you immensely in achieving your goal.

How does Nike's website do this Flash effect when the user selects a choice

I was wondering how does Nike website make the change you can see when selecting a color or a sole. At first I thought they were only using images and when the user picked a color you just replaced that part, but when I selected a different sole I noticed it didn't changed like an image it looked a bit more as if it was being rendered. Does anybody happens to know how this is made? Or where can I get further info about making this effect :)?
It's hard to know for sure, but my guess would be that they're using a rendering service similar to that provided by Adobe's Scene7.
It's a product that is used to colorize/customize a base product image based on user choices.
If you're interested in using the service, I'd suggest signing up for their weekly webinar. I attended one a while back and was very impressed with their offering. They showed the Converse site (which had functionality almost identical functionality to the Nike site) as a demo.
A lot of these tools are built out in Flash using a variety of techniques:
1) You can use Flash's BitmapData object to directly shift the hues of the pixels in your item. This is probably the simplest technique but often limits you to simple color transformations.
2) You can pre-render transparent PNG's (or photos, I guess) containing the various textures you would want to show on your object (for instance patterns or textures) and have them dynamically added to your stage at runtime. This, I think, offers the highest fidelity but means you need all of your items rendered upfront.
3) You can create 3D collada files and load them via a library like Papervision3D. Then dynamically change the texture at runtime. This is the most memory intensive technique and tends to result in far worse fidelity, but for that you get a full 3D object that you can view in space.
I'm sure there are other techniques but those are the top 3 I can think of. I hope that helps!

Web Interfaces: What is a good way to display many static fields?

My web applications have pages that display many static fields.
I know that poor layout invariably leads to information overload and poor readability.
My Question:
Are there any best-practices or heuristics for laying out a screen that contains many static fields?
Ordinarily, I would reference Bill Scott and Theresa Neil's excellent book, but I can't seem to find any guidance for this issue.
Here are some guidelines that I'm inclined to follow:
Group related fields.
Position the major (or parent) fields towards the top and the left. Position the minor (or child) fields towards the bottom and right.
Don't feel obliged to fill every pixel. Consider white space if it will improve readability.
Favor progressive disclosure wherever possible.
Consider an accordion control.
Perhaps a Details on Demand approach would work well. Ask yourself which data are absolutely and immediately relevant to the user and group those, while hiding the other data. You can always provide an 'Expand' link or control that would allow a user to view the details if desired.
(It's good to see that you're looking at interface design patterns. They are often overlooked!)
I work on HR software and have faced this problem many times. One thing that we keep seeing in feedback when we introduce collapse controls or any progressive disclosure pattern really is that our users don't like the way those types of "web 2.0" (their words lol) pages don't print out. So just a reminder if your user base still insists on printing large pages of data include a print media stylesheet.
Depending on how large your set of data is I'd seriously consider a some search functionality or a sorting mechanism. Many times when the data set is large different users have different priorities and allowing customization is the only way to satisfy a wide audience.
I think you pretty much answered your own question, especially the grouping of important fields tied to progressive disclosure.

Resources