Re: Text/background color
In the MSDN documentation :
The background color for a character is specified by the SetBkColor and SetBkMode member functions of the CDC class.
This help ?
Roger Allen
Re: Text/background color
Hi,
you have to make the control transparent . If you are using an Edit control you have to implement the
OnCtlColor() function.
ccode
HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
switch(nCtlColor)
{
case CTLCOLOR_EDIT:
{
pDC->SetBkMode(TRANSPARENT);
return myNewBrush;
}
}
return myOldBrush;
}
//where myNewBrush is a brush made with your desired color
//and myOldBrush is a grey one.
/ccode
Re: Text/background color
in *.cpp not *Dlg.cpp put SetDialogBkColor...
-------------------------------------------------
BOOL COcdApp::InitInstance()
{
AfxEnableControlContainer();
//*************THIS**************************
SetDialogBkColor(RGB(0, 0, 0), RGB(0, 0, 255));
//*******************************************
// Standard initialization
// If you are not using these features and wi...
Re: Text/background color
No, Roger, not enough :)
Well, I put static text. Colored (green fonts on black). For background, I load bitmap picture on way: ClassWizard->InsertActiveX Control..->choose Microsoft Forms 2.0 Image -> this creates frame, then go to properties->All->choose picture and in right cell click mice->find the *.bmp picture in directory ... and this is it. Stuffs works great.
(Thanx M$).
And now, how to make my static text transparent, without black background?
I find some "tetris" whatever example, some hints (which are far away from "hinting" me...) So, who would be so kind, and dummy me tell how to make this letters transparent, without background?
Thanx.