How to draw text on desktop?

后端 未结 2 1400
长发绾君心
长发绾君心 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:08

    I want to paint on desktop so my text stays there also when my application is not running.

    If the text should also be there if your app is not running then your only option is to change the wallpaper: find out what the image of the desktop wallpaper is, add your text to that image and save it as a new wallpaper and use that one.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题