Click here to Skip to main content
15,564,534 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad14-Sep-09 20:22
Deepak.Prahlad14-Sep-09 20:22 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 1:19
professional Randor 15-Sep-09 1:19 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad15-Sep-09 2:08
Deepak.Prahlad15-Sep-09 2:08 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 4:06
professional Randor 15-Sep-09 4:06 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad15-Sep-09 5:55
Deepak.Prahlad15-Sep-09 5:55 
GeneralRe: Setting a controls background to transparent Pin
Randor 15-Sep-09 6:42
professional Randor 15-Sep-09 6:42 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad16-Sep-09 0:25
Deepak.Prahlad16-Sep-09 0:25 
GeneralRe: Setting a controls background to transparent Pin
Randor 16-Sep-09 2:50
professional Randor 16-Sep-09 2:50 
Hi Deepak,

This tells me that your Windows theme is overriding the colors. You can disable the theme for an individual control using the SetWindowTheme Function[^]. Lets use your checkbox as an example:

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);
	pDC->SetBkMode(TRANSPARENT);
	hbr = ((HBRUSH)GetStockObject(NULL_BRUSH));
	pDC->SetTextColor(RGB(255, 0, 0));
	SetWindowTheme(pWnd->m_hWnd, L"", L"");
	break;
}


We have disabled the theme on this control. It might not be what you want, maybe it will be ugly in your eyes. Smile | :)

Best Wishes,
-David Delaune
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad16-Sep-09 3:21
Deepak.Prahlad16-Sep-09 3:21 
GeneralRe: Setting a controls background to transparent Pin
Randor 16-Sep-09 3:57
professional Randor 16-Sep-09 3:57 
GeneralRe: Setting a controls background to transparent Pin
Deepak.Prahlad23-Sep-09 0:25
Deepak.Prahlad23-Sep-09 0:25 
QuestionCan we access session cookies from C++/VC++ code? Pin
sarat14-Sep-09 7:08
sarat14-Sep-09 7:08 
QuestionRe: Can we access session cookies from C++/VC++ code? Pin
David Crow14-Sep-09 8:05
David Crow14-Sep-09 8:05 
AnswerRe: Can we access session cookies from C++/VC++ code? [modified] Pin
sarat16-Sep-09 7:54
sarat16-Sep-09 7:54 
QuestionRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 7:59
David Crow16-Sep-09 7:59 
AnswerRe: Can we access session cookies from C++/VC++ code? Pin
sarat16-Sep-09 9:16
sarat16-Sep-09 9:16 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow16-Sep-09 9:19
David Crow16-Sep-09 9:19 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
sarat23-Sep-09 0:52
sarat23-Sep-09 0:52 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
David Crow23-Sep-09 3:53
David Crow23-Sep-09 3:53 
GeneralRe: Can we access session cookies from C++/VC++ code? Pin
sarat23-Sep-09 21:43
sarat23-Sep-09 21:43 
QuestionODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 3:57
Rafix11114-Sep-09 3:57 
AnswerRe: ODBC- too long text trnasmition problem Pin
David Crow14-Sep-09 5:26
David Crow14-Sep-09 5:26 
GeneralRe: ODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 8:23
Rafix11114-Sep-09 8:23 
GeneralRe: ODBC- too long text trnasmition problem Pin
David Crow14-Sep-09 8:30
David Crow14-Sep-09 8:30 
GeneralRe: ODBC- too long text trnasmition problem Pin
Rafix11114-Sep-09 10:35
Rafix11114-Sep-09 10:35 

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.