Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CMFCCustomizeButton::m_bIgnoreLargeIconsMode

15 views
Skip to first unread message

Sergei Riaguzov

unread,
Aug 11, 2008, 6:39:07 AM8/11/08
to
Hi,

I'm trying to not allow "more" image on CMFCCustomizeButton to scale
with LargeIcons, so I found a static field m_bIgnoreLargeIconsMode in
CMFCCustomizeButton, however it seems to do nothing. The only place it
is used in in afxcustomizebutton.cpp in OnDraw method:


//----------------------
// Fill button interior:
//----------------------
m_bDefaultDraw = TRUE;

FillInterior(pDC, rectBorder, bHighlight || IsDroppedDown());

int nMargin = CMFCVisualManager::GetInstance()-
>GetToolBarCustomizeButtonMargin();

if (m_bDefaultDraw)
{
CSize sizeImage = CMenuImages::Size();
if (CMFCToolBar::IsLargeIcons() && !m_bIgnoreLargeIconsMode)
{
sizeImage.cx *= 2;
sizeImage.cy *= 2;
}

if (m_iCustomizeCmdId > 0)
{
//-----------------
// Draw menu image:
//-----------------

// [skipped]
}

if (!m_lstInvisibleButtons.IsEmpty())
{
//-------------------
// Draw "more" image:
//-------------------

// [skipped]
}

This looks like it (the "more" image is supposed to be drawn here, but
the code never goes to this last if blocks, so the
bIgnoreLargeIconsMode is ignored, cause sizeImage is not used after it
is modified... so I suppose "more" images has to be drawn somewhere
else?

0 new messages