怎样改变某些控件的颜色? 截获Paint事件自己画背景,或者用API函数SetbkColor设置 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 人家的Statusbar是自己做的吧! Windows向窗口发送一个WM_ERASEBKGND消息通知该窗口擦除背景,可以使用ClassWizard重载该消息的缺省处理程序来擦除背景(实际是画),并返回TRUE以防止Windows擦除窗口。//Paint area that needs to be erased.BOOL CSampleView : : OnEraseBkgnd (CDC* pDC){// Create a pruple brush.CBrush Brush (RGB (128 , 0 , 128) )// Select the brush into the device context .CBrush* pOldBrush = pDC—>SelcetObject (&brush)// Get the area that needs to be erased .CRect reClippDC—>GetCilpBox (&rcClip)//Paint the area.pDC—> PatBlt (rcClip.left , rcClip.top , rcClip.Width ( ) , rcClip.Height( ) , PATCOPY )//Unselect brush out of device context .pDC—>SelectObject (pOldBrush )// Return nonzero to half fruther processing .return TRUE} 看看http://www.csdn.net/expert/TopicView.asp?id=5792后跟我联系吧! 如何捕捉按钮的点击事件,怎样才能把它记录下来? 一个连接数据库的问题。。。 求助 Function 中的返回值问题 自上个世纪以来,一直困扰我公司程序员的问题。如下: 项目申请表 标准链式打印纸如何不间断打印? 请教一下打包方面的小问题? 有關crystal reports 的問題 向各位大虾请教一个关于子程序的问题。 ★★高手过招★★:如何实现不定数组的存储并用饼图显示出来? 如何在运行时修改Data Report中Report header中的内容 如此伤心!
//Paint area that needs to be erased.
BOOL CSampleView : : OnEraseBkgnd (CDC* pDC)
{
// Create a pruple brush.
CBrush Brush (RGB (128 , 0 , 128) )// Select the brush into the device context .
CBrush* pOldBrush = pDC—>SelcetObject (&brush)// Get the area that needs to be erased .
CRect reClip
pDC—>GetCilpBox (&rcClip)
//Paint the area.
pDC—> PatBlt (rcClip.left , rcClip.top , rcClip.Width ( ) , rcClip.Height( ) , PATCOPY )//Unselect brush out of device context .
pDC—>SelectObject (pOldBrush )// Return nonzero to half fruther processing .
return TRUE
}
后跟我联系吧!