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

Search:

Type: Posts; User: Oliver M.

Page 1 of 3 1 2 3

Search: Search took 0.05 seconds.

  1. Re: Multithreading + debugging = driving me crazy

    I am also on VC++ 6.0 SP6.
    Now that I disable VA every time before I debug, I experience much fewer lockups.

    Another thing to be checked is what other programs are installed and running, for...
  2. Re: Multithreading + debugging = driving me crazy

    Well, I'd rather restart when VS hangs than rebuild all every time, this would take less time in case of my project (legacy code bload) :(

    Do you have any plugins in VS installed? I had relatively...
  3. Re: Multithreading + debugging = driving me crazy

    I also lived with the described symptom on Windows XP for a few years now, every now and then searching for a solution. Did anybody already solved this issue?
  4. Replies
    7
    Views
    859

    Re: what's the use of union?

    The terminating null is not required by the ID3v1 tag, just store 29 chars without terminating null. Sorry for being OT.
  5. Replies
    3
    Views
    422

    Re: declaration with width

    This declares a "C" Bitfield e.g. in a struct. AFAIK only integral types (signed, unsigned, int) are allowed. You basically say that the is_key variable should use 1 bit. Example:

    struct SFoo {...
  6. Replies
    20
    Views
    1,465

    Re: std::vector simple scope question

    Interesting what you read from the line "issues of multithreading (although it is not that safe)"... I meant "safe" in regards to debugging issues, nothing more.
  7. Replies
    6
    Views
    3,489

    Re: clistctrl threadsafe access

    You cannot use the CListCtrl class from multiple threads because MFC uses thread-local storage to map window handles to MFC objects.

    Try to use the window handle of the list control instead of the...
  8. Replies
    10
    Views
    1,086

    Re: Clone function (pure virtual base class)

    The OP obviously does not want to create a typical clone function. I think he wants to create an object of a type that is defined dynamically by the type of another object. Thus he wants to 'clone'...
  9. Replies
    20
    Views
    1,465

    Re: std::vector simple scope question

    Right: just make it a habit to always set pointers to deleted objects to NULL and forget about it. It will not harm you (much) but might help you. :)
  10. Replies
    20
    Views
    1,465

    Re: std::vector simple scope question

    You are right, I overlooked your statement

    But be honest: how many compilers and systems do you know where the memory is neither sweeped in debug mode nor the access of an unallocated memory...
  11. Replies
    10
    Views
    1,086

    Re: Clone function (pure virtual base class)

    You cannot dynamically bind default values in function definitions because the function type is defined statically and the default value is part of the function type. Thus the compiler must know the...
  12. Replies
    20
    Views
    1,465

    Re: std::vector simple scope question

    The last call to foo->someFunc() calls the function code correctly, but the object the function points to is already deleted. The point is that after ~Foo has been called and may even have set foo->p...
  13. Thread: using enum

    by Oliver M.
    Replies
    6
    Views
    681

    Re: using enum

    The switch statement was just an example; the real code is much more complicated. Anyway, it's my decision whether to write optimized or readable code in the first place, and I should strive for...
  14. Thread: using enum

    by Oliver M.
    Replies
    6
    Views
    681

    Re: using enum

    Aaahhrrgg! Even more typing! Aaahhrrgg! ;) Just kidding - this is a very good idea and I think that a good optimizing compiler will not leave any overhead. Thank you!
  15. Thread: using enum

    by Oliver M.
    Replies
    6
    Views
    681

    Re: using enum

    bummer :(Maybe you're right ;)

    Ok, I also felt it would increase code readability in some places, but well, then I have to use multiple using declarations (although they are non-standard).
    ...
  16. Thread: using enum

    by Oliver M.
    Replies
    6
    Views
    681

    using enum

    Consider the following:

    struct SColors
    {
    enum enColors { red, green,blue };
    };

    void Foo(SColors::enColor Color)
    {
    switch(Color)
  17. Replies
    3
    Views
    608

    Re: Function Templates

    @humptydumpty
    Thanks for your comment. I also realized this behavior, since I am playing around with this issue quite a few days. The question was *why* both function calls have the same address.
    ...
  18. Replies
    3
    Views
    608

    Function Templates

    Well, I think I am stuck:

    template<int TSIZE>
    struct A
    {
    int get_size() const { return TSIZE; };
    char buffer[TSIZE];
    };

    template<int TSIZE>
  19. Replies
    0
    Views
    519

    XML tags all upcase

    I experience a strange behavior of the MSXML3 parser: My code uses the MSXML3 component (CLSID_XMLDocument, through the IXMLDocument, IXMLElement, IXMLElementCollection interfaces) to parse XML...
  20. Replies
    12
    Views
    3,511

    Re: Lvn_itemchanging

    A possible solution would be

    1) add a string member variable to the dialog, e.g. m_sError
    2) store the change deny message in the member variable instead of displaying it in OnItemChangingLC
    3)...
  21. Replies
    9
    Views
    2,837

    Re: min / max macros

    Occasionally found another solution for accessing the numeric_limits::min/max while peeking into the boost library code. Sometimes it's so simple after all:


    // Will not compile if max(a,b) macro...
  22. Replies
    9
    Views
    2,837

    Re: min / max macros

    Based on your answer I assume that you did not understand the issue. Please reread my post!

    I need to use e.g. std::numeric_limits<>::max(), so how can I do so if the max(a,b) macro is defined? Or...
  23. Replies
    9
    Views
    2,837

    Re: min / max macros

    @marten_range
    Ah, the pragma's! I'll enclose them with #ifdef _MSC_VER and off I go!
    Thank you, this is a life-safer!

    And thank you for your applause. I'm not so critical with MS code, most of...
  24. Replies
    9
    Views
    2,837

    Re: min / max macros

    Yes, but as I wrote, I'm working on a project that makes heavy use of these macros. I cannot tell all developers to rewrite their code just because I globally undefine these macros.

    So I'm looking...
  25. Replies
    9
    Views
    2,837

    min / max macros

    I'm just working on a project that makes heavy use of the min(a,b) and max(a,b) macros defined in Windef.h. I would really prefer using std::min(...) and std::max(...) instead, not to mention...
Results 1 to 25 of 75
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured