m_Rgn.DeleteObject();
VERIFY(m_Rgn.CreateRoundRectRgn(0,0,itemRect.right - itemRect.left,itemRect.bottom - itemRect.top,15,15));
SetWindowRgn(NULL,false) ;
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect itemRect = lpDIS->rcItem;
CBrush m_newBrush;
VERIFY(m_newBrush.CreateSolidBrush( m_colBoard ));
VERIFY(pDC->FrameRgn( &m_Rgn , &m_newBrush , 1, 1 )); /ERIFY(pDC->FillRgn( &m_hrgn, &m_newBrush));
SetWindowRgn(m_Rgn, true);
这样执行没有问题
///////////////////////////
m_Rgn.DeleteObject();
VERIFY(m_Rgn.CreateRoundRectRgn(0,0,itemRect.right - itemRect.left,itemRect.bottom - itemRect.top,15,15));
SetWindowRgn(NULL,false) ;
SetWindowRgn(m_Rgn, true);
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect itemRect = lpDIS->rcItem;
CBrush m_newBrush;
VERIFY(m_newBrush.CreateSolidBrush( m_colBoard ));
VERIFY(pDC->FrameRgn( &m_Rgn , &m_newBrush , 1, 1 )); VERIFY(pDC->FillRgn( &m_hrgn, &m_newBrush));
执行FrameRgn或FillRgn就会出错
////////////////////////////////////////////////
也就是说SetWindowRgn的执行必须FrameRgn和FillRgn后
VERIFY(m_Rgn.CreateRoundRectRgn(0,0,itemRect.right - itemRect.left,itemRect.bottom - itemRect.top,15,15));
SetWindowRgn(NULL,false) ;
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect itemRect = lpDIS->rcItem;
CBrush m_newBrush;
VERIFY(m_newBrush.CreateSolidBrush( m_colBoard ));
VERIFY(pDC->FrameRgn( &m_Rgn , &m_newBrush , 1, 1 )); /ERIFY(pDC->FillRgn( &m_hrgn, &m_newBrush));
SetWindowRgn(m_Rgn, true);
这样执行没有问题
///////////////////////////
m_Rgn.DeleteObject();
VERIFY(m_Rgn.CreateRoundRectRgn(0,0,itemRect.right - itemRect.left,itemRect.bottom - itemRect.top,15,15));
SetWindowRgn(NULL,false) ;
SetWindowRgn(m_Rgn, true);
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
CRect itemRect = lpDIS->rcItem;
CBrush m_newBrush;
VERIFY(m_newBrush.CreateSolidBrush( m_colBoard ));
VERIFY(pDC->FrameRgn( &m_Rgn , &m_newBrush , 1, 1 )); VERIFY(pDC->FillRgn( &m_hrgn, &m_newBrush));
执行FrameRgn或FillRgn就会出错
////////////////////////////////////////////////
也就是说SetWindowRgn的执行必须FrameRgn和FillRgn后
解决方案 »
- VC的字符串解析问题
- VC 程序运行时,每隔一分钟就可以发送一个时钟消息。应该写在哪个函数里?
- 关于串行化内改称 api FILE* 引出的问题
- OpenGL消除隐藏面问题!
- 召唤高手(牙科医生)救救 解决不料问题我就去裸奔
- 200分求NetTalk的源码
- 求TC下文件递归搜索例程,谢谢!有大量注释者将多给分!
- 请教一个关于属性页的问题
- 怎样证明 n×n+41n+41 n是整数时的结果都为质数???救命啊。
- 1usb设备具有FAT系统,插入计算机能读该盘文件,该设备能自己改变内部文件大小,但WIN读的时候还是开始时大小.怎样才能刷新为现在的实际大小
- error C2446:“==”: 没有从“HANDLE”到“long”的转换 memset”: 不能将参数 2 从“LPBYTE”转换为“int”
- VC 生成的txt文件不能换行
你的问题出在这儿!