Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#16 bug in CUpdateUIBase - UPDUI_TEXT removed prematurely

Unstable (example)
closed-wont-fix
None
5
2014-03-01
2004-10-21
risa2000
No

There are three functions in CUpdateUIBase:
UIUpdateMenuBar, UIUpdateStatusBar, and
UIUpdateChildWindows which incorectly handle UPDUI_TEXT
type _AtlUpdateUIData item. Each function clears and
frees all text items regardless the UI element type or
whether they were updated.
The patch changes the behavior in the way, the text is
deleted only when it is the last update related to this
particular UI element (ID).
I general however, I think, that freeing the memory is
not necessary at all, since it is handled in UISetText
and destructor of CUpdateUIBase, but was not brave
enough to submit *that* patch :).

Discussion

  • risa2000
    risa2000
    2004-10-21

    patch to WTL 4291 version of atlframe.h

     
    Attachments
    • assigned_to: nobody --> nenadstefanovic
     
  • We can't do that because we don't know when to do it. All those functions can manually be called in the code. In your patch you are assuming that all of them will be called, which doesn't have to be true.

    Also, it is extremely unlikely that you would want to set the same text to these different UI elements - they typically have some specific additions.

    This feature sounds good on paper, but is very limited, and usually not even used.

     
    • status: open --> closed-wont-fix
    • Group: --> Unstable (example)