~~~请大家帮忙看看~~~~ CRgn myrgn;myrgn.CreatePolygonRgn(LPpoint lpPoint,int nCount,int nMode)lppoint 为一CPoint 型的数组,nCount为数组元素个数,nMode为该区域的填充模式 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to fyougo(莱斯洛特): 关键是如何得到回复人:lppoint . 是显是的到每一点的颜色,如果是我要的就rgnTemp.CreateRectRgn(x, y, x+1, y+1);wndRgn.CombineRgn(&wndRgn, &rgnTemp, RGN_XOR);不要就不做; GetWindowRect(&cRect); CPoint ptOrg=cRect.TopLeft(); BITMAP bmInfo; cBitmap.GetObject(sizeof(bmInfo),&bmInfo); CRect rcNewWnd=CRect(ptOrg,CSize(bmInfo.bmWidth,bmInfo.bmHeight)); memDC.CreateCompatibleDC(pDC); pOldMemBmp = memDC.SelectObject(&cBitmap); colMask=memDC.GetPixel(0,0); wndRgn.CreateRectRgn(0, 0, rcNewWnd.Width(), rcNewWnd.Height()); for(x=0; x<=rcNewWnd.Width(); x++) { for(y=0; y<=rcNewWnd.Height(); y++) { col = memDC.GetPixel(x, y); if(col == colMask) { rgnTemp.CreateRectRgn(x, y, x+1, y+1); wndRgn.CombineRgn(&wndRgn, &rgnTemp, RGN_XOR); rgnTemp.DeleteObject(); } } } if (pOldMemBmp) memDC.SelectObject(pOldMemBmp); 绘图过程中,if不能检测到的错误,为何ASSERT却能检测到!? mfc timer 能不能暂停 高手进!!谢谢 求《windows程序设计》的源代码? 关于发送和接收的匹配 如何通过注册表键的HKEY句柄得到相应的注册表键名,谢谢 我准备读《C++程序设计语言(特别版)》,有愿意的朋友,我们可以一起读,共同讨论遇到的问题。 Debug版本编译错误 VC++中使用SQL语句SELECT所遇到的问题. 哪里有16进制编辑器? 用了SetForegroundWindow();窗口在任务栏闪烁,怎么让它不要闪,直接到最前面?( win2000下) 如何在IE的工具栏中加入自己的图标
关键是如何得到回复人:lppoint .
wndRgn.CombineRgn(&wndRgn, &rgnTemp, RGN_XOR);不要就不做;
GetWindowRect(&cRect);
CPoint ptOrg=cRect.TopLeft(); BITMAP bmInfo;
cBitmap.GetObject(sizeof(bmInfo),&bmInfo);
CRect rcNewWnd=CRect(ptOrg,CSize(bmInfo.bmWidth,bmInfo.bmHeight)); memDC.CreateCompatibleDC(pDC);
pOldMemBmp = memDC.SelectObject(&cBitmap);
colMask=memDC.GetPixel(0,0); wndRgn.CreateRectRgn(0, 0, rcNewWnd.Width(), rcNewWnd.Height());
for(x=0; x<=rcNewWnd.Width(); x++)
{
for(y=0; y<=rcNewWnd.Height(); y++)
{
col = memDC.GetPixel(x, y);
if(col == colMask)
{
rgnTemp.CreateRectRgn(x, y, x+1, y+1);
wndRgn.CombineRgn(&wndRgn, &rgnTemp, RGN_XOR);
rgnTemp.DeleteObject();
}
}
}
if (pOldMemBmp) memDC.SelectObject(pOldMemBmp);