Click here to Skip to main content
15,905,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 20:43
R@jeev K R8-Mar-10 20:43 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner8-Mar-10 20:49
Le@rner8-Mar-10 20:49 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 20:55
R@jeev K R8-Mar-10 20:55 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner8-Mar-10 20:59
Le@rner8-Mar-10 20:59 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 21:18
R@jeev K R8-Mar-10 21:18 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner8-Mar-10 22:08
Le@rner8-Mar-10 22:08 
GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R8-Mar-10 22:20
R@jeev K R8-Mar-10 22:20 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner9-Mar-10 0:22
Le@rner9-Mar-10 0:22 
i use this for color
CBrush m_brush;
m_brush.CreateSolidBrush(RGB(241,244,250));//in OnInitDialog

HBRUSH CTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	
	switch (nCtlColor)
	{
		case CTLCOLOR_EDIT:
			pDC->SetTextColor(RGB(0,0,0));
			pDC->SetBkColor(RGB(255,255,255));
			return hbr;

		case CTLCOLOR_STATIC:			
			LOGBRUSH logbrush;
			m_brush.GetLogBrush( &logbrush );
			pDC->SetTextColor(RGB(0,0,0));
			pDC->SetBkColor(logbrush.lbColor);
			return m_brush;
			

		case CTLCOLOR_BTN:
		case CTLCOLOR_MSGBOX:
		case CTLCOLOR_DLG:
			return m_brush;
		
		default:
			return m_brush;
	}
}

BOOL CTest::OnEraseBkgnd(CDC *pDC)
{
	CPen myPen,hpenOld;
	CRect rect;
	GetClientRect(&rect);
	for(int i=0;i<rect.bottom;)
	{	myPen.CreatePen(PS_SOLID,1,RGB(241,244,250));
		pDC->SelectObject(&myPen);
		pDC->MoveTo(0,i);
		pDC->LineTo(rect.right,i);
		i++;
		myPen.DeleteObject();
	}
	return 1
}

GeneralRe: Repainting of dialog box takes time. Pin
R@jeev K R9-Mar-10 0:44
R@jeev K R9-Mar-10 0:44 
GeneralRe: Repainting of dialog box takes time. [modified] Pin
Mohan Ramachandra9-Mar-10 1:54
Mohan Ramachandra9-Mar-10 1:54 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner9-Mar-10 2:00
Le@rner9-Mar-10 2:00 
GeneralRe: Repainting of dialog box takes time. Pin
Eugen Podsypalnikov9-Mar-10 0:40
Eugen Podsypalnikov9-Mar-10 0:40 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner9-Mar-10 0:42
Le@rner9-Mar-10 0:42 
GeneralRe: Repainting of dialog box takes time. Pin
Eugen Podsypalnikov9-Mar-10 0:56
Eugen Podsypalnikov9-Mar-10 0:56 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner9-Mar-10 1:01
Le@rner9-Mar-10 1:01 
GeneralRe: Repainting of dialog box takes time. Pin
Eugen Podsypalnikov9-Mar-10 1:05
Eugen Podsypalnikov9-Mar-10 1:05 
GeneralRe: Repainting of dialog box takes time. Pin
Le@rner9-Mar-10 1:41
Le@rner9-Mar-10 1:41 
QuestionHow to allocate memory for 2-D integer array in one line? Pin
Nilesh Hamane8-Mar-10 18:35
Nilesh Hamane8-Mar-10 18:35 
AnswerRe: How to allocate memory for 2-D integer array in one line? Pin
Avi Berger8-Mar-10 19:23
Avi Berger8-Mar-10 19:23 
GeneralRe: How to allocate memory for 2-D integer array in one line? Pin
Cool_Dev8-Mar-10 19:59
Cool_Dev8-Mar-10 19:59 
QuestionRe: How to allocate memory for 2-D integer array in one line? Pin
CPallini8-Mar-10 20:50
mveCPallini8-Mar-10 20:50 
AnswerRe: How to allocate memory for 2-D integer array in one line? Pin
Eugen Podsypalnikov8-Mar-10 20:54
Eugen Podsypalnikov8-Mar-10 20:54 
AnswerRe: How to allocate memory for 2-D integer array in one line? Pin
LunaticFringe9-Mar-10 3:18
LunaticFringe9-Mar-10 3:18 
GeneralRe: How to allocate memory for 2-D integer array in one line? Pin
Nilesh Hamane26-Jan-11 22:34
Nilesh Hamane26-Jan-11 22:34 
Questionrandom numbers Pin
MsmVc8-Mar-10 18:22
MsmVc8-Mar-10 18:22 

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.