Chinaunix首页 | 论坛 | 博客
  • 博客访问: 454789
  • 博文数量: 724
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 5010
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 14:47
文章分类

全部博文(724)

文章存档

2011年(1)

2008年(723)

我的朋友

分类:

2008-10-13 17:24:39


这个FormView的父窗口中:
.h中
CxxFormView *xx;

.cpp中
xx=new CxxFormView;
CWnd* pWnd;
pWnd=xx;
pWnd->EnableScrollBarCtrl(0,FALSE);
pWnd->EnableScrollBarCtrl(1,FALSE);

对话框的属性: Style: Child ; Border: Dialog Frame


响应CxxFormView的OnSize
void CxxView::OnSize(UINT nType, int cx, int cy) 
{
// CFormView::OnSize(nType, cx, cy);

}
( salam11 发表于 2004-11-19 9:53:00)

如何去掉FORM视图FORMVIEW的难看的边框?
1.加入ModifyStyleEx(0,  WS_EX_STATICEDGE);
ModifyStyleEx(WS_EX_CLIENTEDGE,0 );
注意,一定要放到CFormView::OnInitialUpdate();之前啊,否则没效果,呵呵!
void CWinStyleTestView::OnInitialUpdate()
{
ModifyStyleEx(0,  WS_EX_STATICEDGE);
ModifyStyleEx(WS_EX_CLIENTEDGE,0 );
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();

}
2.在OnDraw中绘制边框
void CWinStyleTestView::OnDraw(CDC* pDC) 
{
// TODO: Add your specialized code here and/or call the base class
//绘制边框线
CRect rcClient;
GetClientRect(&rcClient); pDC->Draw3dRect(0,0,rcClient.Width(),rcClient.Height(),::GetSysColor(COLOR_BTNSHADOW),::GetSysColor(COLOR_BTNHILIGHT));

} ( xqyz8888 发表于 2004-3-11 15:29:00)

.......................................................

--------------------next---------------------

阅读(256) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~