我想在鼠标指针下边画一个半透明的圆,鼠标位置通过ci得到了 可是没有画出来 为什么呢(hMemDc没有问题,鼠标本身就被画进去了)
int x0=ci.ptScreenPos.x - ii.xHotspot-40;
int y0=ci.ptScreenPos.y-ii.yHotspot-40;
int x1=ci.ptScreenPos.x - ii.xHotspot+40;
int y1=ci.ptScreenPos.y-ii.yHotspot+40;
int rheight=y1-y0;
int rwide=x1-x0;
Rect myrect(x0,y0,rwide,rheight);
LinearGradientBrush myLinearGradientBrush( myrect, Color(255, 0, 0, 255), Color(255, 0, 255, 0), LinearGradientModeHorizontal);Graphics mygraphics(hMemDC); mygraphics.FillEllipse(&myLinearGradientBrush,x0,y0,rwide,rheight);
int x0=ci.ptScreenPos.x - ii.xHotspot-40;
int y0=ci.ptScreenPos.y-ii.yHotspot-40;
int x1=ci.ptScreenPos.x - ii.xHotspot+40;
int y1=ci.ptScreenPos.y-ii.yHotspot+40;
int rheight=y1-y0;
int rwide=x1-x0;
Rect myrect(x0,y0,rwide,rheight);
LinearGradientBrush myLinearGradientBrush( myrect, Color(255, 0, 0, 255), Color(255, 0, 255, 0), LinearGradientModeHorizontal);Graphics mygraphics(hMemDC); mygraphics.FillEllipse(&myLinearGradientBrush,x0,y0,rwide,rheight);
解决方案 »
- listbox如何可以左键点击第一项时,失去焦点与不被选中?
- [急切求助]如何用MFC连接C#写的WebService(在线等)
- vc2005下,如何打开classwizard
- 关于WSAAsyncSelect 的FD_WRITE消息的困惑
- 求助:关于求点的坐标问题
- 100分跪求VC6中的excpt.h!!!急在线等
- 按了最大化按钮之后,不希望窗体变成最大,重载哪个函数可以解决这个问题?
- 分手了,郁闷!散分!!!!!!!!!!11
- 关于COM的问题--高手请进来看看啊
- 组件注册时生成的CLSID是根据什么算法得来的?
- Excel模版作为自定义资源使用问题?
- 获取一个bmp图片中的某个按钮图片的坐标,然后将该按钮图片添加到一个button上面,如何实现?在线求解
alpha值原来是255,当然没有透明度了。帮你改成128了,试下吧。