Click here to Skip to main content
15,887,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Message Deleted] Pin
ranga.careers19-May-09 6:27
ranga.careers19-May-09 6:27 
AnswerRe: MSCOMM Pin
CPallini19-May-09 7:39
mveCPallini19-May-09 7:39 
QuestionDisabling a CView, and darkening it Pin
Sternocera19-May-09 6:13
Sternocera19-May-09 6:13 
QuestionRe: Disabling a CView, and darkening it Pin
David Crow19-May-09 7:33
David Crow19-May-09 7:33 
AnswerRe: Disabling a CView, and darkening it Pin
Sternocera19-May-09 7:48
Sternocera19-May-09 7:48 
GeneralRe: Disabling a CView, and darkening it Pin
David Crow19-May-09 9:06
David Crow19-May-09 9:06 
GeneralRe: Disabling a CView, and darkening it Pin
Sternocera19-May-09 10:14
Sternocera19-May-09 10:14 
AnswerRe: Disabling a CView, and darkening it Pin
Sternocera19-May-09 11:18
Sternocera19-May-09 11:18 
Here's how far I've got:
void CCommonBaseView::OnDraw(CDC* pDC)
{
	
	if(view_is_disabled)
	{
		pDC->SetDCPenColor(RGB(0,0,0));
		pDC->SetROP2(R2_MERGEPEN);		
	}
	CFormView::OnDraw(pDC);
}


It ought to be possible for me to change the way that we draw to the device context through the CDC pointer, and make the CView appear different somehow - darkening it, or making it grayscale, or something else. I don't seem to be having much luck drawing to the device context after the base class implementation has been called; It just makes swathes of gray turn white.

What approach is suggested?

Regards,
Sternocera
GeneralRe: Disabling a CView, and darkening it Pin
Sternocera20-May-09 3:27
Sternocera20-May-09 3:27 
QuestionApplication Crashes at mfc42!CMapStringToString::GetAssocAt+14 Pin
U Mallikarjuna Rao19-May-09 5:58
U Mallikarjuna Rao19-May-09 5:58 
AnswerRe: Application Crashes at mfc42!CMapStringToString::GetAssocAt+14 Pin
Cedric Moonen19-May-09 7:52
Cedric Moonen19-May-09 7:52 
GeneralRe: Application Crashes at mfc42!CMapStringToString::GetAssocAt+14 Pin
U Mallikarjuna Rao19-May-09 8:59
U Mallikarjuna Rao19-May-09 8:59 
QuestionHow to change the clsid of an ocx? Pin
SIJUTHOMASP19-May-09 5:50
professionalSIJUTHOMASP19-May-09 5:50 
QuestionRe: How to change the clsid of an ocx? Pin
CPallini19-May-09 6:15
mveCPallini19-May-09 6:15 
AnswerRe: How to change the clsid of an ocx? Pin
SIJUTHOMASP19-May-09 7:05
professionalSIJUTHOMASP19-May-09 7:05 
GeneralRe: How to change the clsid of an ocx? Pin
CPallini19-May-09 7:30
mveCPallini19-May-09 7:30 
Question_bstr_t and _variant_t [modified] Pin
vital_parsley200019-May-09 5:32
vital_parsley200019-May-09 5:32 
AnswerRe: _bstr_t and _variant_t Pin
Chris Losinger19-May-09 5:46
professionalChris Losinger19-May-09 5:46 
Questioninsert records using parameters . Pin
vital_parsley200019-May-09 5:31
vital_parsley200019-May-09 5:31 
AnswerRe: insert records using parameters . Pin
Stuart Dootson19-May-09 7:16
professionalStuart Dootson19-May-09 7:16 
GeneralRe: insert records using parameters . Pin
vital_parsley200019-May-09 18:01
vital_parsley200019-May-09 18:01 
GeneralRe: insert records using parameters . Pin
Stuart Dootson19-May-09 21:49
professionalStuart Dootson19-May-09 21:49 
QuestionToolBar Bitmaps? Pin
Software200719-May-09 4:38
Software200719-May-09 4:38 
AnswerRe: ToolBar Bitmaps? Pin
David Crow19-May-09 4:52
David Crow19-May-09 4:52 
GeneralRe: ToolBar Bitmaps? Pin
Software200719-May-09 5:06
Software200719-May-09 5:06 

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.