BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Bugs and Problems
 Group Box and RedrawWindow issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jerry79

5 Posts

Posted - 04/01/2004 :  9:56:44 PM  Show Profile  Reply with Quote
I create a vc6 project with a CFormView using bcgbcpro 6.70, when i add a group box to the form view,it doesn't display correctly! if i set TRANSPARENT style to it,its ok.
But I need redrawwindow, and the Group box is disappeared after redrawwindow, is it a Bug?
I need strong support about this issue,my schedule is urgent!
Thanks very much!!!!!
The source code as below:
void CRTPrintSetForm::OnRadio1()
{
RedrawWindow();
DrawPortrait();
}

void CRTPrintSetForm::OnRadio2()
{
RedrawWindow();
DrawLandScape();
}

void CRTPrintSetForm::DrawPortrait()
{
CWnd *pWnd = GetDlgItem(IDC_STATIC_PICTURE
CDC* pDC = pWnd->GetDC();
CRect rect;
pWnd->GetClientRect(&rect);
pDC->MoveTo(rect.Width()/6,0);
pDC->LineTo(5*rect.Width()/6,0);
pDC->LineTo(5*rect.Width()/6,rect.Width());
pDC->LineTo(rect.Width()/6,rect.Width());
pDC->LineTo(rect.Width()/6,0);
pWnd->ReleaseDC(pDC);

}

void CRTPrintSetForm::DrawLandScape()
{
CWnd *pWnd = GetDlgItem(IDC_STATIC_PICTURE);
CDC* pDC = pWnd->GetDC();
CRect rect;
pWnd->GetClientRect(&rect);
pDC->MoveTo(0,rect.Width()/6);
pDC->LineTo(rect.Width(),rect.Width()/6);
pDC->LineTo(rect.Width(),5*rect.Width()/6);
pDC->LineTo(0,5*rect.Width()/6);
pDC->LineTo(0,rect.Width()/6);
pWnd->ReleaseDC(pDC);//ͷDC

}

Dawoun

450 Posts

Posted - 04/02/2004 :  02:54:22 AM  Show Profile  Visit Dawoun's Homepage  Reply with Quote
Try adding WS_CLIPCHILDREN to the CFormView's window style.
Go to Top of Page

jerry79

5 Posts

Posted - 04/02/2004 :  10:42:55 AM  Show Profile  Reply with Quote
I have resolved this problem.
Thanks very much!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To:
BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000