如何在一个dialog上直接画图 因为还想在其上添加其他空间,因为不想使用CEdit之类的画图。图画很简单。多谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在OnPaint函数中,创建位图的CBrush然后填充这个客户区即可。! int CGraphSeeView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CFormView::OnCreate(lpCreateStruct) == -1) return -1; m_bitmap.LoadBitmap(IDB_BITMAP_BACKGROUND); return 0;}void CGraphSeeView::OnPaint() { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here CRect rect; GetClientRect(rect); CDC *pdc=GetDC(); CBrush brush; brush.CreatePatternBrush(&m_bitmap); pdc->FillRect(rect,&brush); // Do not call CFormView::OnPaint() for painting messages} 那个消息能让ListView checkbox 状态 VC与VS 关于找不到标识符的问题 救命啊,工具栏添加CMFCToolBarComboBoxButton不成功 100分求使用ClipBoard遇到的棘手问题 急急急!跪求高手们帮帮忙,教我如何使用CDhtmlDialog方法或实例. 显示文件 openGL视图用鼠标旋转了任意角度,现在如何恢复到初始状态. 打不开"ws2.lib"??? 链接错误!不知道为什么啊~~~~~~谢谢所有关注的人 谁有多边形的截剪算法的实现代码?分不够再加。 使用 SMTP 协议编程,发送附件的代码怎么写?
int CGraphSeeView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFormView::OnCreate(lpCreateStruct) == -1)
return -1;
m_bitmap.LoadBitmap(IDB_BITMAP_BACKGROUND);
return 0;
}
void CGraphSeeView::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
CRect rect;
GetClientRect(rect); CDC *pdc=GetDC();
CBrush brush;
brush.CreatePatternBrush(&m_bitmap);
pdc->FillRect(rect,&brush);
// Do not call CFormView::OnPaint() for painting messages
}