VC 如何对编辑框中的文本描边? 如何对编辑框中的文本描边?急用,谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 什么是描边啊?http://topic.csdn.net/t/20041006/10/3428734.html 新建个子类,继承父类CEdit,在OnNcPaint里面加入以下代码void CMyEdit::OnNcPaint() { // TODO: Add your message handler code here // Do not call CEdit::OnNcPaint() for painting messages CBrush *m_pBoundryBrush = new CBrush(RGB(111,222,99)); CWindowDC DC(this); CRect Rect; GetWindowRect(&Rect); DC.DrawEdge(CRect(0,0,Rect.Width(),Rect.Height()),EDGE_SUNKEN,BF_FLAT|BF_RECT); m_pBoundryBrush->DeleteObject(); delete m_pBoundryBrush; }再将CMyEdit关联到你的edit控件~:) 这样可以了,上面的写错了.void CMyEdit::OnNcPaint() { // TODO: Add your message handler code here CDC* pDC = GetWindowDC( ); CRect rect; GetWindowRect( &rect); rect.OffsetRect( -rect.left, -rect.top); //Draw a single line around the outside CBrush brush( RGB( 255, 0, 0)); pDC->FrameRect( &rect, &brush); ReleaseDC( pDC);} VS2005开发的ocx打cab包问题 如何保存对话框中区域内容为bmp图像 在编辑框中实现与word内容类似? 请问如何在程序中验证win98系统的用户名和密码? 请问vc下如何打印一个小凭条??类似超市的那种凭条?? 如何用程序模拟点击另一个程序中的某一窗口的按钮?? 问一下有关复印件与原件的识别 我能不能对一串口进行读友进行写,应该是可以吧,这中间是不是需要一定的延迟 如何普捉这个事件? 悬赏1000RMB求购dat转换成txt的秘籍 急问!关于调用DELPHI编写的DLL的问题!在线等! 关于PE的问题,非高手无进来!
http://topic.csdn.net/t/20041006/10/3428734.html
void CMyEdit::OnNcPaint()
{
// TODO: Add your message handler code here
// Do not call CEdit::OnNcPaint() for painting messages
CBrush *m_pBoundryBrush = new CBrush(RGB(111,222,99));
CWindowDC DC(this);
CRect Rect;
GetWindowRect(&Rect);
DC.DrawEdge(CRect(0,0,Rect.Width(),Rect.Height()),EDGE_SUNKEN,BF_FLAT|BF_RECT);
m_pBoundryBrush->DeleteObject();
delete m_pBoundryBrush;
}
再将CMyEdit关联到你的edit控件~:)
void CMyEdit::OnNcPaint()
{
// TODO: Add your message handler code here
CDC* pDC = GetWindowDC( );
CRect rect;
GetWindowRect( &rect);
rect.OffsetRect( -rect.left, -rect.top);
//Draw a single line around the outside
CBrush brush( RGB( 255, 0, 0));
pDC->FrameRect( &rect, &brush);
ReleaseDC( pDC);
}