- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
看着 window tooltips
类提示窗口,我看到它绘制了它的阴影 外 提示窗口的实际矩形。
使用 spy XX - 我可以获得工具提示的窗口矩形和类样式:
Rectangle: (440, 229)-(544, 249), 104x20
Restored Rect: (440, 229)-(544, 249), 104x20
Client Rect: (0, 0)-(104, 20), 104x20
您会注意到您看到的投影实际上位于正在绘制的窗口之外。我怎样才能在我的 window 周围画一个阴影,同时是
外 我的 window ?
CS_DROPSHADOW
class style.我已经通过实验证实了这一点,并且还可以在
中查看窗口的类样式 spy XX ;它不使用
CS_DROPSHADOW
:
Windows Styles: 94000001
WS_POPUP 80000000
WS_VISIBLE 10000000
WS_CLIPSIBLINGS 4000000
TTS_ALWAYSTIP 1
Extended Styles: 00080088
WS_EX_LAYERED 80000
WS_EX_TOOLWIN 80
WS_EX_TOPMOST 8
那么我怎样才能在窗外画画呢?
Drawing To and Reading From the Screen-- Baaaad!
Lastly, since we're on the redirectiontopic, one particularly dangerouspractice is writing to the screen,either through the use of GetDC(NULL)and writing to that, or attempting todo XOR rubber-band lines, etc. Thereare two big reasons that writing tothe screen is bad:
It's expensive... writing to thescreen itself isn't expensive, but itis almost always accompanied byreading from the screen because onetypically does read-modify-writeoperations like XOR when writing tothe screen. Reading from the videomemory surface is very expensive,requires synchronization with the DWM,and stalls the entire GPU pipe, aswell as the DWM application pipe.
It's unpredictable... if you somehowmanage to get to the actual primaryand write to it, there can be nopredictability as to how long what youwrote to the primary will remain onscreen. Since the UCE doesn't knowabout it, it may get cleared in thenext frame refresh, or it may persistfor a very long time, depending onwhat else needs to be updated on thescreen. (We really don't allow directwriting to the primary anyhow, forthat very reason... if you try toaccess the DirectDraw primary, forinstance, the DWM will turn off untilthe accessing application exits)
最佳答案
你不能以你描述的方式在窗外画画。
如果您右键单击桌面然后转到属性/外观/效果并取消选中“在菜单下显示阴影”......您将不再有阴影。
底线是这是窗口管理器的产品,而不是您的程序。
关于windows - 如何在窗外画画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2232727/
现在我希望 Canvas 只绘制一种颜色。 public class AndroidTentaTestActivity extends Activity { private Bitmap bm
我是一名优秀的程序员,十分优秀!