Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Drawing text to the Desktop wnd

Drawing text to the Desktop wnd

Scheduled Pinned Locked Moved C / C++ / MFC
comgraphicstutorialquestionannouncement
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TigerNinja_
    wrote on last edited by
    #1

    My goal is to have some text displayed on the desktop all the time. In experimenting I found that I can easily draw text to the Desktop, but as soon as the next repaint of the Desktop I lose it. Would I need to intercept messages (i.e. Paint) going to the Desktop so that I can repaint my text to be displayed everytime ? And how would I keep the text just at the level of the Desktop, for example, I wouldn't want the text to paint over IE ? Thanks.

    R.Bischoff

    Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

    A P RaviBeeR 3 Replies Last reply
    0
    • T TigerNinja_

      My goal is to have some text displayed on the desktop all the time. In experimenting I found that I can easily draw text to the Desktop, but as soon as the next repaint of the Desktop I lose it. Would I need to intercept messages (i.e. Paint) going to the Desktop so that I can repaint my text to be displayed everytime ? And how would I keep the text just at the level of the Desktop, for example, I wouldn't want the text to paint over IE ? Thanks.

      R.Bischoff

      Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      Probably a bad idea...you should look into shell programming probably... If nothing in there will solve your issue...then get the bitmap your user has set as a background, draw on it, save a new bmp (background w/ your text on it) and set it as the new background. If there not using any bmp for backgrounds, then make them :) How do I print my voice mail?

      T 1 Reply Last reply
      0
      • T TigerNinja_

        My goal is to have some text displayed on the desktop all the time. In experimenting I found that I can easily draw text to the Desktop, but as soon as the next repaint of the Desktop I lose it. Would I need to intercept messages (i.e. Paint) going to the Desktop so that I can repaint my text to be displayed everytime ? And how would I keep the text just at the level of the Desktop, for example, I wouldn't want the text to paint over IE ? Thanks.

        R.Bischoff

        Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

        P Offline
        P Offline
        parths
        wrote on last edited by
        #3

        Try and check out GetDesktopWindow followed by GetWindowDC and DrawText "It was when I found out I could make mistakes that I knew I was on to something." -Ornette Coleman "Philosophy is a study that lets us be unhappy more intelligently." -Anon.

        1 Reply Last reply
        0
        • T TigerNinja_

          My goal is to have some text displayed on the desktop all the time. In experimenting I found that I can easily draw text to the Desktop, but as soon as the next repaint of the Desktop I lose it. Would I need to intercept messages (i.e. Paint) going to the Desktop so that I can repaint my text to be displayed everytime ? And how would I keep the text just at the level of the Desktop, for example, I wouldn't want the text to paint over IE ? Thanks.

          R.Bischoff

          Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #4

          How about redrawing your text in a timer loop? /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

          1 Reply Last reply
          0
          • A alex barylski

            Probably a bad idea...you should look into shell programming probably... If nothing in there will solve your issue...then get the bitmap your user has set as a background, draw on it, save a new bmp (background w/ your text on it) and set it as the new background. If there not using any bmp for backgrounds, then make them :) How do I print my voice mail?

            T Offline
            T Offline
            TigerNinja_
            wrote on last edited by
            #5

            I like your idea. You know, XP has some registry setting that when enabled it displays the OS version on your desktop, I wonder how they do that ? What about creating a transparent window, that is always +1 level than the desktop. Then I would just write my text to that window ? Thanks to all.

            R.Bischoff

            Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

            A 1 Reply Last reply
            0
            • T TigerNinja_

              I like your idea. You know, XP has some registry setting that when enabled it displays the OS version on your desktop, I wonder how they do that ? What about creating a transparent window, that is always +1 level than the desktop. Then I would just write my text to that window ? Thanks to all.

              R.Bischoff

              Denn Gott hat die Menschen so sehr geliebt, daß er seinen einzigen Sohn für sie hergab. Jeder, der an ihn glaubt, wird nicht verlorengehen, sondern das ewige Leben haben

              A Offline
              A Offline
              alex barylski
              wrote on last edited by
              #6

              Soliant wrote: the OS version on your desktop, I wonder how they do that ? Use Spy and figure out if it's a window or not...it could be using Active desktop (which i am not familiar with) or just a transparent window like you suggest. How do I print my voice mail?

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups