Click here to Skip to main content
15,886,693 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[Message Deleted] Pin
Jim Fell14-Sep-09 9:45
Jim Fell14-Sep-09 9:45 
AnswerRe: Reading ASCII File TAB is Replace with NULL Pin
David Crow14-Sep-09 10:06
David Crow14-Sep-09 10:06 
QuestionActive windows Pin
mishudev14-Sep-09 8:58
mishudev14-Sep-09 8:58 
AnswerRe: Active windows Pin
Randor 14-Sep-09 9:52
professional Randor 14-Sep-09 9:52 
QuestionSetting a controls background to transparent Pin
Deepak.Prahlad14-Sep-09 7:47
Deepak.Prahlad14-Sep-09 7:47 
AnswerRe: Setting a controls background to transparent Pin
Randor 14-Sep-09 9:50
professional Randor 14-Sep-09 9:50 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad14-Sep-09 19:22
Deepak.Prahlad14-Sep-09 19:22 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 0:19
professional Randor 15-Sep-09 0:19 
Hi Deepak,

Deepak.Prahlad wrote:
If I return it for all controls, check boxes become black. What to do?


If you are custom coloring multiple controls in your WM_CTLCOLOR handler then it would be better to use a switch statement with a single call to the pWnd->GetDlgCtrlID() function.

To handle both the static and the checkbox try something like this:

int iCtrlID = pWnd->GetDlgCtrlID();
switch(iCtrlID)
{
	case IDC_STATIC_DATE:
	{
		pDC->SetBkMode(TRANSPARENT);
		hbr = ((HBRUSH)GetStockObject(NULL_BRUSH));
		break;
	}
	case IDC_YOUR_CHECKBOX:
	{
		RECT r;
		pWnd->GetClientRect(&r);
		pDC->BitBlt(0, 0, r.right - r.left, r.bottom - r.top, pWnd->GetDC(), r.left, r.top, SRCCOPY);
		hbr = ((HBRUSH)GetStockObject(NULL_BRUSH));
		break;
	}
	default:
		break;
}

GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad15-Sep-09 1:08
Deepak.Prahlad15-Sep-09 1:08 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 3:06
professional Randor 15-Sep-09 3:06 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad15-Sep-09 4:55
Deepak.Prahlad15-Sep-09 4:55 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 5:42
professional Randor 15-Sep-09 5:42 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad15-Sep-09 23:25
Deepak.Prahlad15-Sep-09 23:25 
GeneralRe: Setting a controls background to transparent Pin
Randor 16-Sep-09 1:50
professional Randor 16-Sep-09 1:50 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad16-Sep-09 2:21
Deepak.Prahlad16-Sep-09 2:21 
GeneralRe: Setting a controls background to transparent Pin
Randor 16-Sep-09 2:57
professional Randor 16-Sep-09 2:57 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad22-Sep-09 23:25
Deepak.Prahlad22-Sep-09 23:25 
QuestionCan we access session cookies from C++/VC++ code? Pin
sarat14-Sep-09 6:08
sarat14-Sep-09 6:08 
QuestionRe: Can we access session cookies from C++/VC++ code? Pin
David Crow14-Sep-09 7:05
David Crow14-Sep-09 7:05 
AnswerRe: Can we access session cookies from C++/VC++ code? [modified] Pin
sarat16-Sep-09 6:54
sarat16-Sep-09 6:54 
QuestionRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 6:59
David Crow16-Sep-09 6:59 
AnswerRe: Can we access session cookies from C++/VC++ code? Pin
sarat16-Sep-09 8:16
sarat16-Sep-09 8:16 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 8:19
David Crow16-Sep-09 8:19 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
sarat22-Sep-09 23:52
sarat22-Sep-09 23:52 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow23-Sep-09 2:53
David Crow23-Sep-09 2:53 

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.