CMP EMBEDDED.COM

Login | Register     Welcome Guest  
HOME DESIGN PRODUCTS COLUMNS E-LEARNING CONFERENCES CODE FORUMS/BLOGS NEWSLETTERS CONTACT FEATURES RSS RSS

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) 
{
...
}

Embedded.com Career Center
Looking for a new job?
SEARCH JOBS

Browse all jobs

SPONSOR
RECENT JOB POSTINGS





 :