Menu

#21 HiliteControl fix under Carbon

open
nobody
None
5
2003-10-20
2003-10-20
Chris Waco
No

HiliteControl does not always redraw the control in Carbon
applications.

There are a few places in the code that do the following:

MDialogUtils.cpp's FlashButton()
void XPushButton::SimulateClick()
{
...
::HiliteControl(controlH, kControlButtonPart);

    uint32 ticks;
    ::Delay\(8, &ticks\);

    ::HiliteControl\(controlH, 0\);

}

I suggest writing and using the following routine instead of
HiliteControl:

HiliteControlAndFlushBuffer( ControlRef inControl,
ControlPartCode inPart )
{
if ( inControl )
{
HiliteControl( inControl, inPart );
QDFlushPortBuffer(
GetWindowPort(GetControlOwner(inControl)), NULL );
}
}

Discussion


Log in to post a comment.

MongoDB Logo MongoDB