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. CWnd::GetDlgCtrlID()

CWnd::GetDlgCtrlID()

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
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.
  • N Offline
    N Offline
    n 0
    wrote on last edited by
    #1

    void CDialog::OnMouseMove(UINT nFlags, CPoint point) { CPoint point; CWnd *wd; GetCursorPos(&point); if( (wd = WindowFromPoint(point)) ) { SetCursor(LoadCursor(NULL, (wd->GetDlgCtrlID() == IDCANCEL) ? IDC_ARROW : IDC_WAIT)); } } hello. i've got a lengthy op and therefore an hourglass as mouse cursor. it should stay that way while not pointing to the cancel button. i wrote the code above to accomplish this. problem: my dlg has also got a toolbar and 2 radio buttons that seem to override all this; the mouse icon is always an arrow when i point on them. can somebody help, please? Я люблю русский язикь!

    B 1 Reply Last reply
    0
    • N n 0

      void CDialog::OnMouseMove(UINT nFlags, CPoint point) { CPoint point; CWnd *wd; GetCursorPos(&point); if( (wd = WindowFromPoint(point)) ) { SetCursor(LoadCursor(NULL, (wd->GetDlgCtrlID() == IDCANCEL) ? IDC_ARROW : IDC_WAIT)); } } hello. i've got a lengthy op and therefore an hourglass as mouse cursor. it should stay that way while not pointing to the cancel button. i wrote the code above to accomplish this. problem: my dlg has also got a toolbar and 2 radio buttons that seem to override all this; the mouse icon is always an arrow when i point on them. can somebody help, please? Я люблю русский язикь!

      B Offline
      B Offline
      BadJerry
      wrote on last edited by
      #2

      You should override OnSetCursor associated to the message WM_SETCURSOR so you get notified when the cursor is to be changed...

      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