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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. show small image in every place of screen

show small image in every place of screen

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
4 Posts 3 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.
  • A Offline
    A Offline
    A_Salimi
    wrote on last edited by
    #1

    Hello every one. i want to show an image in every place of screen with MFC. for example i want to load an arrow picture near windows clock or near start menu or in every place in its original shape and not in the dialog or form. Please help me or give me a good link for this action. Thanks.

    PJ ArendsP 1 Reply Last reply
    0
    • A A_Salimi

      Hello every one. i want to show an image in every place of screen with MFC. for example i want to load an arrow picture near windows clock or near start menu or in every place in its original shape and not in the dialog or form. Please help me or give me a good link for this action. Thanks.

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      You could use a borderless popup window. You could even use window regions to have the window in the shape you want.

      Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      A 1 Reply Last reply
      0
      • PJ ArendsP PJ Arends

        You could use a borderless popup window. You could even use window regions to have the window in the shape you want.

        Within you lies the power for good - Use it!

        A Offline
        A Offline
        A_Salimi
        wrote on last edited by
        #3

        Thanks for your answer.if it's possible for you please more explain. imagin you want to draw a line on Specified window.recently i used this codes to draw a line on my application's dialog: CClientDc mydc(this); mydc.MoveTo(5, 20); mydc.LineTo(80,20); but this codes draw a line in my application's dialog. Who can i draw a line in every window that i want?

        L 1 Reply Last reply
        0
        • A A_Salimi

          Thanks for your answer.if it's possible for you please more explain. imagin you want to draw a line on Specified window.recently i used this codes to draw a line on my application's dialog: CClientDc mydc(this); mydc.MoveTo(5, 20); mydc.LineTo(80,20); but this codes draw a line in my application's dialog. Who can i draw a line in every window that i want?

          L Offline
          L Offline
          leon de boer
          wrote on last edited by
          #4

          You really can't do that in MFC or at least not using any MFC commands because the windows you are trying to draw on don't belong to MFC :-) You can use WIN32 API commands to draw on the desktop like this

          /* Get the DC of the desktop */
          HDC hDC_Desktop = GetDC(0);

          /* Draw a simple blue rectangle on the desktop */
          RECT rect = { 0, 0, 200, 200 };
          HBRUSH blueBrush=CreateSolidBrush(RGB(0,0,255));
          FillRect(hDC_Desktop, &rect, blueBrush);

          Your drawing wont stay there very long or be refreshed however :-) To make anything permanent on the desktop you need to subclass the desktop handler and it's paint message and that requires a lot more knowledge. http://msdn.microsoft.com/en-us/library/windows/desktop/bb773183%28v=vs.85%29.aspx[^] I suspect you are going to tell us more about what you are trying to do.

          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