under text color not changed
-
plz solve my problem as i change the color of static control but as it contain text so under text it does not change color i use folloowing code to change color HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); { if(nCtlColor== CTLCOLOR_STATIC ) hbr=CreateSolidBrush(RGB(0,100,0)); } return hbr; } Please mail me
-
plz solve my problem as i change the color of static control but as it contain text so under text it does not change color i use folloowing code to change color HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); { if(nCtlColor== CTLCOLOR_STATIC ) hbr=CreateSolidBrush(RGB(0,100,0)); } return hbr; } Please mail me
Please have a look on Ali Rafiee's Yet Another Transparent Static Control[^] Good luck!
-
plz solve my problem as i change the color of static control but as it contain text so under text it does not change color i use folloowing code to change color HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); { if(nCtlColor== CTLCOLOR_STATIC ) hbr=CreateSolidBrush(RGB(0,100,0)); } return hbr; } Please mail me
I didnt sea any problems with you code.
yogendra kaushik wrote:
as i change the color of static control but as it contain text so under text it does not change color i use folloowing code to change color
I didnt get you actually can you be more specific? SaRath.
"Do Next Thing..." Understanding State Pattern in C++ -
Please have a look on Ali Rafiee's Yet Another Transparent Static Control[^] Good luck!
it will transparent all dialog box Please mail me
-
plz solve my problem as i change the color of static control but as it contain text so under text it does not change color i use folloowing code to change color HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); { if(nCtlColor== CTLCOLOR_STATIC ) hbr=CreateSolidBrush(RGB(0,100,0)); } return hbr; } Please mail me
Maybe you should try this?
HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr; if(nCtlColor == CTLCOLOR_STATIC ) { hbr=CreateSolidBrush(RGB(0,100,0)); pDC->SetBkColor(RGB(0,100,0)); //for text colour, also use this: pDC->SetTextColor(RGB(0,0,0)); } else { hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); } return hbr; }
-
Maybe you should try this?
HBRUSH CAdmin::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr; if(nCtlColor == CTLCOLOR_STATIC ) { hbr=CreateSolidBrush(RGB(0,100,0)); pDC->SetBkColor(RGB(0,100,0)); //for text colour, also use this: pDC->SetTextColor(RGB(0,0,0)); } else { hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); } return hbr; }
thank s a lot .................again Please mail me