CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Mza

Search: Search took 0.09 seconds.

  1. Replies
    2
    Views
    5,018

    I tried changing TVN_SELCHANED to TVN_SELCHANGING...

    I tried changing TVN_SELCHANED to TVN_SELCHANGING but that does not work with me. I think the problem is that MFC automatically updates the tree with a visible selection after TVN_SELCHANGING.

    The...
  2. Replies
    2
    Views
    5,018

    Disable selection in CTreeCtrl

    I don't know if it is possible but I have a CTreeCtrl object with checkboxes and that works fine. The thing is that I don't like the selection in my tree. I already have checkboxes so I do not have...
  3. Replies
    11
    Views
    5,703

    He thanks KeyserSoze , your solution works great....

    He thanks KeyserSoze , your solution works great. Finally my tree does exactly what I want.
  4. Replies
    11
    Views
    5,703

    I must admit that I never used updateData(), but...

    I must admit that I never used updateData(), but somehow all my tree items get added just fine. The only problem is the getCheck() operation. I tried adding updateData() but unfortunately that does...
  5. Replies
    11
    Views
    5,703

    Does anybody know a solution for the above...

    Does anybody know a solution for the above problem. The frustrating part is that in some cases the checkboxes are actually checked but most of time not. And I do exactly the same (I made a function...
  6. Thnx, that worked fine for me :thumb: But...

    Thnx, that worked fine for me :thumb:

    But unfortunately in a more complex situation I created, this resulted in some circular references that I could not solve. Therefor I worked around this...
  7. Replies
    10
    Views
    4,864

    Well, I think the answer is no. Basically, they...

    Well, I think the answer is no. Basically, they only share a couple of attributes, so packaging these attributes should be enough. By the way, why package these attributes in a class and not in a...
  8. Replies
    10
    Views
    4,864

    class CLevel { public: bool visible; int...

    class CLevel
    {
    public:
    bool visible;
    int nr;
    CString text;
    HTREEITEM treePos;

    CLevel(int a_level);
    virtual ~CLevel();
  9. Replies
    10
    Views
    4,864

    Well, I think my classes have enough in common to...

    Well, I think my classes have enough in common to justify a common base class. But I am doubting if I should doubt ;) I probably just need more experience in these matters to feel more confident in...
  10. Replies
    10
    Views
    4,864

    When to define a common base class

    This is more a general OO question, but I was wondering when to define a base class and when not to. For instance, I have a couple of classes (not derived), all with a few common attributes but no...
  11. It's a pretty old topic but it covers my problem....

    It's a pretty old topic but it covers my problem. I can't seem to successfully implement the following solution.

    I have the following classes/definitions:


    #include "MyTreeCtrl.h"
    class...
  12. That sounds really logical to me . But I do not...

    That sounds really logical to me . But I do not really know a way to pass that pointer to the CMyTreeCtrl class. As far as I know, I do not (explicitly) call the constructor or any other function...
  13. How to access other objects public attributes?

    How do I access public attributes from other objects?

    I have the following situation: The function OnNMClick (from the derived CTreeCtrl class CMyTreeCtrl) is called when I click in the dialog...
  14. Replies
    22
    Views
    1,406

    Looks good to me. I'm getting it ASAP. Yes, it...

    Looks good to me. I'm getting it ASAP.

    Yes, it is much better. Not only faster but also more logical en better to understand. :thumb:
  15. Replies
    22
    Views
    1,406

    Well, thanks anyway for the reply. It teaches me...

    Well, thanks anyway for the reply. It teaches me alot about the inner working of maps. By the way, that first solution you suggested does not seem to work in my case, that was the first thing I tried...
  16. Replies
    22
    Views
    1,406

    Nevermind, I already discovered the origin of the...

    Nevermind, I already discovered the origin of the compile errors. A map needs a standard constructor and I made a constructor with arguments (although all arguments had default values). Now I just...
  17. Replies
    22
    Views
    1,406

    class CLevel { public: bool visible;...

    class CLevel
    {
    public:
    bool visible;
    CString text;
    int level;

    CLevel(int l_level);
    virtual ~CLevel();
    };
  18. Replies
    22
    Views
    1,406

    Well, I don't have a preference for any...

    Well, I don't have a preference for any datastructure as long as it does the job. So I started with the adjustments for map, but now It won't compile anymore. The implementation using vectors was...
  19. Replies
    22
    Views
    1,406

    So I guess it is not possible to keep using...

    So I guess it is not possible to keep using Vectors in this situation. Then a map indeed sounds like a better solution, although I don't like the idea of data duplication. Of course I could always...
  20. Replies
    22
    Views
    1,406

    But won't this searching for level = n cost me...

    But won't this searching for level = n cost me O(n) time? Or is this inevitable with the way I use vectors?
  21. Thread: Vectors Vs Array

    by Mza
    Replies
    31
    Views
    2,575

    std::vector myVector // Ensure that...

    std::vector<int> myVector

    // Ensure that capacity is big enough to avoid memory reallocation.
    myVector.reserve(n);

    //and now n times
    myVector.push_back(element);

    Great, this works fine :)
  22. Thread: Vectors Vs Array

    by Mza
    Replies
    31
    Views
    2,575

    I always used arrays but from what I see these...

    I always used arrays but from what I see these vector are very useful. Therefor I started using them in my current project. I want to use these vectors in a situation where I have a fixed number of...
  23. Replies
    22
    Views
    1,406

    Thnx for the help :) I tried several...

    Thnx for the help :)

    I tried several implementations including an adjustment to what I posted earlier, namely:

    typedef std::set<int> levels;
    typedef std::map<int,levels> subgroups;
    typedef...
  24. Replies
    22
    Views
    1,406

    Need advice with datastructure

    Hi everybody,

    I'm pretty new to C++ so I don't know if I'm on the right track with the following subject.

    I'm making a little application to modify and view some logging information. Every log...
Results 1 to 24 of 24





Click Here to Expand Forum to Full Width

Featured