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. change mouse cursor at run time

change mouse cursor at run time

Scheduled Pinned Locked Moved C / C++ / MFC
comquestion
2 Posts 2 Posters 1 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
    Anand for every one
    wrote on last edited by
    #1

    i am writting an ActiveX control. i want change mouse cursor at run time. i written the following code in OnSetCursor. SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); But OnSetCursor is not called. how call the OnSetCursor. won't framework call it? :omg:

    N 1 Reply Last reply
    0
    • A Anand for every one

      i am writting an ActiveX control. i want change mouse cursor at run time. i written the following code in OnSetCursor. SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); But OnSetCursor is not called. how call the OnSetCursor. won't framework call it? :omg:

      N Offline
      N Offline
      namaskaaram
      wrote on last edited by
      #2

      well..... u have to override the OnSetCursor function!!!!! just calling it wont help!!!!! add the WM_SETCURSOR..... then in that function.....:)remove the return statement and replace it with return TRUE; eg: bool EXAMPLE::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) { .... ... .... return CDialog::OnSetCursor(pWnd, nHitTest, message); return TRUE; } now add the code where u want to add it ...... SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT)); hope that helpz!!!!! cheerz.....:-D "faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13

      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