How to draw text on desktop?

后端 未结 2 1409
长发绾君心
长发绾君心 2021-01-14 12:33

I need to draw a scrolling text directly on desktop. I can draw text on top of all windows using DC := GetDC(0). But I don\'t want that. The drawing has to be on desktop onl

2条回答
  •  醉酒成梦
    2021-01-14 13:16

    This has been possible for a long time with layered windows. Use the WS_EX_LAYERED and WS_EX_TRANSPARENT window states. You will want to ensure that the z-order of the window puts it underneath all other top-level windows. The article I link to has a number of code samples to get you going.


    After I added this answer you added a further requirement that the text be drawn beneath the icons on the desktop. I suspect that this is not possible with layered windows since layered windows cannot be child windows.

提交回复
热议问题