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. Global custom cursor that never change?

Global custom cursor that never change?

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 2 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
    Tommy Svensson
    wrote on last edited by
    #1

    Hi, I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand). Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior. Thx! /T

    M 1 Reply Last reply
    0
    • T Tommy Svensson

      Hi, I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand). Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior. Thx! /T

      M Offline
      M Offline
      Madhu Nair 0
      wrote on last edited by
      #2

      Tommy Svensson wrote:

      would it be possible to change system cursor to a custom one

      Well, I haven't tried it exactly; let me share some ideas or workarounds. You can change the system cursors to a custom one using either one of the following or in a combination of two. 1. SystemParametersInfo : Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter. 2. SetSystemCursor : Enables an application to customize the system cursors. It replaces the contents of the system cursor specified by the id parameter with the contents of the cursor specified by the hcur parameter and then destroys hcur. I will recommend the 1'st one to try out, beacuse by using this API you can do anything that you done to change the Desktop settings manually. Use the SPI_SETCURSORS parameter for changing cursor. You may get some ideas from 1. http://www.thebitguru.com/articles/14-Programmatically%20Changing%20Windows%20Mouse%20Cursors[^] 2.http://msdn.microsoft.com/en-us/library/ms724947.aspx[^] 3.How to programatically disable/enable screen savers/power management[^] *4. The google codesearch[^] result

      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