Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTCaption::UpdateCaption icon bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTCaption::UpdateCaption icon bug

 Post Reply Post Reply
Author
Message
Kimeli View Drop Down
Newbie
Newbie


Joined: 14 July 2003
Location: Finland
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kimeli Quote  Post ReplyReply Direct Link To This Post Topic: CXTCaption::UpdateCaption icon bug
    Posted: 28 December 2004 at 4:00am
I noticed a tiny bug in CXTCaption::UpdateCaption.
Bug occurs when changing icon from "real icon" to "null icon".

In CXTCaption::UpdateCaption are following code:

    if (hIcon != NULL)
    {
        m_hIcon    = hIcon;
        DrawCaptionIcon( pDC, rcClient );
    }

So if given icon is NULL, then CXTCaption::m_hIcon wont be updated and
previous icon will be painted when next update occurs (UpdateCaption seems
to work ok before next paint, because it erases background in UpdateCaption also).

Luckily, UpdateCaption is virtual, so it can be override. But that
if (hIcon != NULL) should be removed, set m_hIcon outside of
that scope, etc..

[offtopic]
Happy new year!
[/offtopic]


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.