CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    21

    How do I change the mouse pointer in a Dialog box

    I have created a few mouse cursors. Now how do I change the cursor to one of these cursor in a dialog box. I want to change the cursor depending on what the user is doing..

    Thanks

    Centurion Software Australia

  2. #2
    Join Date
    May 1999
    Location
    Toulouse, France
    Posts
    171

    Re: How do I change the mouse pointer in a Dialog box

    Have you tried to implement a response to WM_SETCURSOR message ? For example

    BOOL CMyDialog::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
    {
    if(Condition){
    ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_CROSS));

    }else{
    ::SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
    }
    }

    HTH.

    K.

    Ash to ash and clay to clay, if the enemy doesn't get you, your own folk may.
    We're talking ****, 'cause life is a 'biz
    You know it is
    Everybody tryin' to get rich
    God ****!
    All I wanna do is live !

    KoRn, Children of the Korn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured