Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Celal Sen
|
Feb 10, 2012 - 7:17 AM
|
We are using tooltip windows with icon size larger than 16x16. In this case, the tooltip window doesn’t show the icon correctly. In CExtPopupMenuTipWnd class,
HRGN CExtPopupMenuTipWnd::CalcRegion(
CDC & dc, CSize * pSize // = NULL ) { ... ... ...
CRect rcWnd = rcTextMeasure; e_tip_style_t eTS = GetTipStyle(); switch( eTS ) { case __ETS_BALLOON: case __ETS_BALLOON_NO_ICON: { rcWnd.InflateRect( m_sizeRounders ); -->> PROBLEM IS HERE if( eTS != __ETS_BALLOON_NO_ICON && (! m_icon.IsEmpty() ) ) { rcWnd.right += m_sizeRenderingIcon.cx + m_nIconMarginDX;
if( rcWnd.Height() < m_sizeRenderingIcon.cy ) -->> PROBLEM IS HERE rcWnd.bottom = rcWnd.top + m_sizeRenderingIcon.cy;
} ... ... }
rcWnd.Height() never becomes smaller than m_sizeRenderingIcon.cy when the icon size is, for example, 24x24. Because the InflateRect functions makes rcWnd.top negative. The solution I found is to move the line
rcWnd.InflateRect( m_sizeRounders );
below
if( rcWnd.Height() < m_sizeRenderingIcon.cy ) rcWnd.bottom = rcWnd.top + m_sizeRenderingIcon.cy;
If I’m wrong please provide an exact solution for this problem. Thanks.
|
|