Listing 9: The CButton paint member function (cbutton.c)
Listing 9: The CButton paint member function (cbutton.c)
#include "cbutton.h"
/* Paint Member Function */
extern ErrorType mButtonPaint(CButton *this, UpdateType tUpdate,
COLORREF colObjFrgd, COLORREF colObjBkgd)
{
ErrorType tError = ERROR_SUCCESS;
if (tUpdateType == RESOURCE) {
colObjBkgd = this->m_colObjKeyUp;
colObjFrgd = this->m_colTxtKeyUp;
}
tError |= this->m_objBase.PaintRect(this->m_posX, this->m_posY,
this->m_posWidth, this->m_posHeight, colObjBkgd);
tError |= this->m_objBase.PaintBevel(this->m_posX, this->m_posY,
this->m_posWidth, this->m_posHeight, colObjBkgd);
tError |= this->m_objBase.PaintText((this->m_posX + (this->m_posWidth/2)),
(this->m_posY + (this->m_posHeight/2)), colObjFrgd, colObjBkgd,
this->m_strCaption );
}
/* GotFocus Member Function */
extern uc_ErrorType mButtonGotFocus(CButton *this)
{
...
}
/* LostFocus Member Function */
extern uc_ErrorType mButtonLostFocus(CButton *this)
{
...
}
|
|
|
|