Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: still on CFileDialog Pin
toxcct14-Nov-06 0:03
toxcct14-Nov-06 0:03 
GeneralRe: still on CFileDialog Pin
Desmo1614-Nov-06 0:02
Desmo1614-Nov-06 0:02 
GeneralRe: still on CFileDialog Pin
toxcct14-Nov-06 0:04
toxcct14-Nov-06 0:04 
AnswerRe: still on CFileDialog Pin
Hamid_RT15-Nov-06 7:05
Hamid_RT15-Nov-06 7:05 
Question[Message Deleted] Pin
Bagaturia david13-Nov-06 23:31
Bagaturia david13-Nov-06 23:31 
AnswerRe: Problem with pointer Pin
Nibu babu thomas13-Nov-06 23:50
Nibu babu thomas13-Nov-06 23:50 
AnswerRe: Problem with pointer [modified] Pin
Viorel.14-Nov-06 0:09
Viorel.14-Nov-06 0:09 
QuestionTransparent background in static text Pin
RadPC13-Nov-06 22:24
RadPC13-Nov-06 22:24 
Hi.

I want to do a small MFC application with a green background. I've seen in codeproject one quick way is to change OnEraseBkgnd() to:

BOOL CTestDlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
CBrush brTapete(RGB(0,127,0));
pDC=this->GetDC();
CBrush* pBrush = (CBrush*)pDC->SelectObject(&brTapete);
CRect Recto;
pDC->GetClipBox(Recto);
pDC->PatBlt(Recto.left,Recto.top,Recto.Width(),Recto.Height(),PATCOPY);
pDC->SelectObject(pBrush);

return TRUE;
}

It works, but now I have problems when putting controls like static texts on it. Their backgrounds are not the same as the application, so it's quite ugly. I've tried to change the control's property "Transparent" to True, but it doesn't work. I guess it's a problem in OnEraseBkgnd not redrawing the background behind the control, but I don't know what to do.

Someone can give me any orientation?

Thanks!
Rad.
AnswerRe: Transparent background in static text Pin
prasad_som13-Nov-06 22:41
prasad_som13-Nov-06 22:41 
GeneralRe: Transparent background in static text Pin
RadPC13-Nov-06 22:59
RadPC13-Nov-06 22:59 
AnswerRe: Transparent background in static text Pin
Hamid_RT15-Nov-06 7:05
Hamid_RT15-Nov-06 7:05 
QuestionHow to change file permission/property in VC++? Pin
Poonamol13-Nov-06 22:08
Poonamol13-Nov-06 22:08 
AnswerRe: How to change file permission/property in VC++? Pin
prasad_som13-Nov-06 23:01
prasad_som13-Nov-06 23:01 
GeneralRe: How to change file permission/property in VC++? Pin
Poonamol14-Nov-06 0:57
Poonamol14-Nov-06 0:57 
GeneralRe: How to change file permission/property in VC++? Pin
prasad_som14-Nov-06 1:04
prasad_som14-Nov-06 1:04 
GeneralRe: How to change file permission/property in VC++? Pin
Hamid_RT15-Nov-06 6:48
Hamid_RT15-Nov-06 6:48 
AnswerRe: How to change file permission/property in VC++? Pin
VonHagNDaz14-Nov-06 3:13
VonHagNDaz14-Nov-06 3:13 
GeneralRe: How to change file permission/property in VC++? Pin
Poonamol14-Nov-06 16:43
Poonamol14-Nov-06 16:43 
GeneralRe: How to change file permission/property in VC++? Pin
Poonamol14-Nov-06 16:43
Poonamol14-Nov-06 16:43 
GeneralRe: How to change file permission/property in VC++? Pin
Poonamol14-Nov-06 16:45
Poonamol14-Nov-06 16:45 
AnswerRe: How to change file permission/property in VC++? Pin
Hamid_RT15-Nov-06 6:49
Hamid_RT15-Nov-06 6:49 
GeneralRe: How to change file permission/property in VC++? Pin
Poonamol15-Nov-06 17:07
Poonamol15-Nov-06 17:07 
GeneralRe: How to change file permission/property in VC++? Pin
Hamid_RT15-Nov-06 18:36
Hamid_RT15-Nov-06 18:36 
QuestionHow do VC++ set the Size and 'Topmost' of a console window? Pin
mathewzhao13-Nov-06 22:06
mathewzhao13-Nov-06 22:06 
AnswerRe: How do VC++ set the Size and 'Topmost' of a console window? Pin
Nibu babu thomas13-Nov-06 23:43
Nibu babu thomas13-Nov-06 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.