Please find the following code very close to the end of the CExtPaintManagerOffice2007_Impl::PaintPushButton()
method:
// Draw focus rectangle
if( _ppbd.m_bDrawFocusRect
&& ( ( !sTitle.IsEmpty() ) || _ppbd.m_nFocusMode == __EBFM_CLIENT_AREA )
&& rcFocus.bottom > rcFocus.top
&& rcFocus.right > rcFocus.left
)
{
rcFocus.DeflateRect( 2, 2 );
dc.DrawFocusRect( &rcFocus );
}
Then please replace the
dc.DrawFocusRect( &rcFocus );
line of code with the following lines:
stat_DrawDotLineH( dc, rcFocus.left, rcFocus.right, rcFocus.top, RGB(0,0,0) );
stat_DrawDotLineH( dc, rcFocus.left, rcFocus.right, rcFocus.bottom, RGB(0,0,0) );
stat_DrawDotLineV( dc, rcFocus.left, rcFocus.top, rcFocus.bottom, RGB(0,0,0) );
stat_DrawDotLineV( dc, rcFocus.right, rcFocus.top, rcFocus.bottom, RGB(0,0,0) );