visual.c 6.0如何改变对话框的背景及文字大小

如题所述

试试这个
二级C语言上机环境 Visual C++ 6.0 下载
http://hi.baidu.com/ton_tony/blog/item/468603f97d27e672024f5608.html

参考资料:我的主页:http://hi.baidu.com/ton_tony
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-04-14
你可以给对话框添加一个WM_CTLCOLOR事件,代码如下:
HBRUSH CMyDlgDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr;
if(nCtlColor==CTLCOLOR_DLG){
CBrush brush(&m_crBK);
CRect rect;
GetClientRect(&rect);
pDC->SelectObject(&brush);
pDC->FillRect(&rect,&brush);
return brush;
}
else
hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
return hbr;
}

m_crBK是一个CBitmap的对象,可以用先导入张位图,然后用m_crBK.LoadBitmap(IDB_BMP_BK);//IDB_BMP_BK是资源ID
字体大小在对话框中有选项的
相似回答