Article ID: 148616
Article Last Modified on 11/18/2003
bCheckDef = FALSE;
This line keeps CheckDefPushButton from being called and the ambient
property from being updated.
///////////////////////////////////////////////////////////////////////////
/
// Display the button with a thick border if appropriate
void CButtonCtrl::OnAmbientPropertyChange(DISPID dispid)
{
TRACE("OnAmbientPropertyChange called\n");
BOOL bDisplayAsDefault = FALSE;
if(DISPID_AMBIENT_DISPLAYASDEFAULT != dispid)
return;
// Check the control site to see if you should add or remove the border
if (!GetAmbientProperty(DISPID_AMBIENT_DISPLAYASDEFAULT, VT_BOOL,
&bDisplayAsDefault))
ASSERT(FALSE);
if(bDisplayAsDefault)
SendMessage(BM_SETSTYLE, BS_DEFPUSHBUTTON, 0);
else
SendMessage(BM_SETSTYLE, BS_PUSHBUTTON, 0);
InvalidateControl();
}
Additional query words: 4.00 focus
Keywords: kbbug kbfix kbnoupdate kbvc410fix kbcontainer kblocalsvr kbctrl KB148616