Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: WM_NCHITTEST / WM_SETCURSOR  (Read 3371 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
WM_NCHITTEST / WM_SETCURSOR
« on: March 06, 2014, 12:41:21 pm »
Hi

My app has 2 windows on 2 separate monitors. When I click a button on one screen, I have to click twice to get the button to function, and again twice on the other screen, etc. So it seems that the window (cursor?) doesn't have focus and my app is getting the mouse XY for the wrong screen, as I can click one part of a screen, and it actions the button on the other screen (in the same XY position).

I have another app, on an older version of SFML (2.0) which works fine.

I have produced log files of WM_ messages, and the difference is, on the app that works OK, I am seeing this very often (every frame, I think):

WM_NCHITTEST
WM_SETCURSOR

I see the MouseMoved code is very different from 2.0 to 2.1.....but I don't think this would be the problem.

Does anyone have any ideas?

Ed

SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: WM_NCHITTEST / WM_SETCURSOR
« Reply #1 on: March 06, 2014, 01:00:19 pm »
This is a known bug that has been fixed, you should try the latest development version.
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: WM_NCHITTEST / WM_SETCURSOR
« Reply #2 on: March 06, 2014, 01:21:48 pm »
Thanks Laurent, I'll check it out now.

Any ideas why it worked OK on 2.0, but not on an older 2.1?
SFML 2.1

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: WM_NCHITTEST / WM_SETCURSOR
« Reply #3 on: March 06, 2014, 01:52:08 pm »
When SFML 2.1 was released it included a "bug fix" for some win32 implementation stuff, however the fix actually caused more issues (like the one you described) and no one caught the bug before 2.1 was released.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor