dialog color
-
hi i am having a dialog name NETDIALOG whose background is having another dialog BACKDIALOG stretched to full screen.if i opend the NETDIALOG its background color is same as the BACKDIALOG.i have to avoid this. what i have to do. the NETDIALOG should open with its own color.
-
hi i am having a dialog name NETDIALOG whose background is having another dialog BACKDIALOG stretched to full screen.if i opend the NETDIALOG its background color is same as the BACKDIALOG.i have to avoid this. what i have to do. the NETDIALOG should open with its own color.
I used to handle the OnPaint message:
void CDlgPPAGMain::OnPaint() { CPaintDC dc(this); // device context for painting CRect r, r2; if( GetSafeHwnd() != 0 && m_clctrlParamsRobotSel.GetSafeHwnd() != 0) { GetClientRect(&r); m_clctrlParamsRobotSel.GetWindowRect(&r2); ScreenToClient(&r2); r.bottom = r2.top; dc.FillSolidRect(r,0x000000); } }
Sure that this is not the best method, but it works. -
I used to handle the OnPaint message:
void CDlgPPAGMain::OnPaint() { CPaintDC dc(this); // device context for painting CRect r, r2; if( GetSafeHwnd() != 0 && m_clctrlParamsRobotSel.GetSafeHwnd() != 0) { GetClientRect(&r); m_clctrlParamsRobotSel.GetWindowRect(&r2); ScreenToClient(&r2); r.bottom = r2.top; dc.FillSolidRect(r,0x000000); } }
Sure that this is not the best method, but it works. -
Don't worry on that, this is a piece of code that I've used and I've not removed anything, this is a variable that refers to a listcontrol that has the same width of the entire dialog, in your case you should get the size of the dialog client are and then paint it.
-
void CDlgPPAGMain::OnPaint() { CPaintDC dc(this); // device context for painting CRect r; if(GetSafeHwnd() != 0) { GetClientRect(&r); dc.FillSolidRect(r,0x000000); } }
this should be ok for you... -
Hey! that's new, I've re-read the first post, in order to do that there is an article here in the CP that explains how to do it. I promise you that I don't remember how to do it, but I've seen a post regarding to that this same week here in the VC forum. Try to search for that, sure that it will work for you.
-
Hey! that's new, I've re-read the first post, in order to do that there is an article here in the CP that explains how to do it. I promise you that I don't remember how to do it, but I've seen a post regarding to that this same week here in the VC forum. Try to search for that, sure that it will work for you.