BCGSoft Forums
BCGSoft Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 BCGControlBar Pro for MFC Forums
 BCGControlBar Bugs and Problems
 Group Box and RedrawWindow issue

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Insert Smilie
   
Message:

* HTML is OFF
* Forum Code is ON

 
   

T O P I C    R E V I E W
jerry79 Posted - 04/01/2004 : 9:56:44 PM
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

}
2   L A T E S T    R E P L I E S    (Newest First)
jerry79 Posted - 04/02/2004 : 10:42:55 AM
I have resolved this problem.
Thanks very much!
Dawoun Posted - 04/02/2004 : 02:54:22 AM
Try adding WS_CLIPCHILDREN to the CFormView's window style.

BCGSoft Forums © Copyright (c) 1998-2022 BCGSoft Co Ltd Go To Top Of Page
Snitz Forums 2000