我的程序是对话框程序!谢谢
解决方案 »
- 如何获得CString中的第一个字符
- 串口通信问题!在线等待求解,急!先谢谢各位兄弟了。
- 已知窗口的句柄,如何使之变为当前激活窗口?
- 如何取得组件(.dll)的当前位置?在组件内部调用GetCurrentDirectory(),应用程序调用的时候就变成应用程序的当前位置了
- 有关DispID
- 再问一个getdocument()函数和其头文件的问题,急急急
- libpng.lib 和GDI+哪个显示PNG图片效率更高
- 找兼职
- VC2008使用问题
- VC6.0中应该没有包含全部的标准C++吧,我是说在1998年完成的标准C++?
- ***求助 想实现一个三层的动态节目单,请大家给建议
- 请问怎样读写串口?
CDC memDC ;
CBitmap memBitmap ;
CBitmap* oldBitmap ; // bitmap originally found in CMemDC
// no real plotting work is performed here,
// just putting the existing bitmaps on the client
// to avoid flicker, establish a memory dc, draw to it
// and then BitBlt it to the client
memDC.CreateCompatibleDC(&dc) ;
memBitmap.CreateCompatibleBitmap(&dc, m_nClientWidth, m_nClientHeight) ;
oldBitmap = (CBitmap *)memDC.SelectObject(&memBitmap) ;
if (memDC.GetSafeHdc() != NULL)
{
// first drop the grid on the memory dc
memDC.BitBlt(0, 0, m_nClientWidth, m_nClientHeight,
&m_dcGrid, 0, 0, SRCCOPY) ;
// now add the plot on top as a "pattern" via SRCPAINT.
// works well with dark background and a light plot
memDC.BitBlt(0, 0, m_nClientWidth, m_nClientHeight,
&m_dcPlot, 0, 0, SRCPAINT) ; //SRCPAINT
// finally send the result to the display
dc.BitBlt(0, 0, m_nClientWidth, m_nClientHeight,
&memDC, 0, 0, SRCCOPY) ;
}
memDC.SelectObject(oldBitmap) ;
PICTURE控件有一个属性,可以放图
你这个程序应在OnDraw中重画。