⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 code23.txt

📁 石油行业油井损害软件,有详细的油井损害模型,对石油建模有重要帮助
💻 TXT
字号:
如何改变视窗的背景颜色

    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 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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -