Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:17:18+00:00 2026-05-30T15:17:18+00:00

I maintain a C++ application that uses flash ocx to play SWF file. When

  • 0

I maintain a C++ application that uses flash ocx to play SWF file.

When user hovers on button in SWF, flash internally makes a call to WinAPI SetCursor function to set IDC_HAND cursor – I can see that when I monitor WinAPI calls to cursor-related function via API Monitor V2 (rohitab.com). However, in my case the cursor is not changing, i.e. stays IDC_ARROW.

The application itself does not call SetCursor at all. The window of the application processes WM_SETCURSOR message as following, i.e. does not restore the cursor:

case WM_SETCURSOR:
    {   
        static bool restoreCursor = false;
        if (LOWORD(lParam) != HTCLIENT)
        {
            restoreCursor = true;
        }

        if (restoreCursor)
        {
            restoreCursor = false;
            // DefWindowProc will set the cursor
            break;
        }
        return 1;
    }

Can anyone please let me know who can reset/change cursor shape in this case?

Update: The interesting part is the fact that I have 2 similar setups that produce the opposite results.

The application I maintain actually installs a WH_GETMESSAGE hook on “SysListView32” and launches a thread that creates Flash player. So the setup is not that straight-forward.

However, if I just create a simple example that creates a player at, basically, winmain, then the code above works perfectly and cursor gets changed.

So it appears that something does reset the cursor state in the first case. How to find out what resets the cursor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:17:20+00:00Added an answer on May 30, 2026 at 3:17 pm

    OK, the real answer on this question is that non-GUI thread cannot change the cursor directly.
    See the comments in the bottom of the page
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms648393%28v=vs.85%29.aspx

    Another solution can be detouring/hooking the SetCursor function to ours that just sends a user message to GUI thread, signalling to set the cursor.

    Both solutions have their pros and, of-course :), cons.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I maintain an application that uses a (to me) surprising PHP quirk/bug/feature. Consider this
I maintain an old J2EE application that uses EJB's. What is involved in converting
I maintain an application that, amongst other things, provides a list to the user
I maintain a legacy Java application that uses Jacob , or Java-COM Bridge, to
I hope this makes sense. I have a ASP.NET web application that uses Entity
I maintain an MFC (VC6) MDI application that uses Frame Windows as views for
I have an application that uses a certificate to talk to a webservice on
I have an application that we wrote here at work that uses the SharpSVN
I've have quite small asp.net MVC 2 application to maintain/extend. Currently it uses hand
I'm developing a multi-user application which uses a (postgresql-)database to store its data. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.