Home > Software engineering >  Use MFC SkinH skin after how graphic control again?
Use MFC SkinH skin after how graphic control again?

Time:09-16

Why use the SkinH to interface to add skin, can't again to change control font color and background color? I try to draw a control in OnCtlColor function of font color and background color, found that there is no change, the skin is not used is effective, could you tell me how to use the skin in case to draw the control again?
HBRUSH CMyDlg: : OnCtlColor (CDC * pDC, CWnd * pWnd, UINT nCtlColor)
{
HBRUSH gets=CDialog: : OnCtlColor (pDC, pWnd, nCtlColor);

//TODO: any features in this change DC
If (pWnd - & gt; GetDlgCtrlID ()=={IDC_EDIT)
PDC - & gt; SetTextColor (RGB (255255, 0));
PDC - & gt; SetBkColor (RGB (0, 0, 0));
Return CreateSolidBrush (RGB (0, 0, 0));
}

//TODO: if the default brush is not required, it returns another brush
Return gets;
}

CodePudding user response:

To change an item, the custom painting with SkinH you use everything is failure, is to learn to use the open source interface library soui, effect is better than the skin library also
  • Related