CodePudding user response:
So how did you add the background image? Are there any code stick out to see?Nothing, it is estimated that it is difficult to help get you
CodePudding user response:
to achieve transparent dialog box when the bitmap as a background of controlCodePudding user response:
Properties dialog to add WS_CLIPCHILDREN | WS_CLIPSIBBINGCodePudding user response:
Do you want to Edit controls the background transparentAdd OnCtlColor function, and then put inside the control background transparent,
Reference:
UINT id=pWnd - & gt; GetDlgCtrlID ();
If (id==IDC_EDIT_Temp | | id==IDC_EDIT_Mai | | id==IDC_EDIT_Spo | | id==IDC_EDIT_XinLv | | id==IDC_EDIT_HuXi | | id==IDC_EDIT_AvgY
| | id==IDC_STIME)
{
PDC - & gt; SetBkMode (TRANSPARENT);
The CDC * dc GetDC ();
PDC - & gt; SetTextColor (RGB (140, 140, 140));
CFont font;
The font. CreatePointFont (130, "the official script");//
PDC - & gt; SelectObject (& amp; The font);//set the font
The SetFont (& amp; The font, 0);
ReleaseDC (dc);
Gets=(HBRUSH) : : GetStockObject (NULL_BRUSH);
}
Return gets;
CodePudding user response:
The first picture, the cursor a edit box it is automatically turned black; The second image, still show after delete text content
About the background to add is the code that I use http://blog.csdn.net/amusi1994/article/details/53729776
CodePudding user response: