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

Author Topic: Ignore mouse input  (Read 2957 times)

0 Members and 1 Guest are viewing this topic.

kneksacke

  • Newbie
  • *
  • Posts: 11
    • View Profile
Ignore mouse input
« on: April 23, 2017, 03:50:10 pm »
I have a window in sfml its transparent. i want to be able to click behind it (its topmost window)
is it possible to do this? i don't mind using windows.h its just a personal program.

i want to make a screen overlay for my self.


Code i use for transparent window
   
SetWindowLong(window.getSystemHandle(), GWL_STYLE, WS_POPUP | WS_VISIBLE);
DwmExtendFrameIntoClientArea(window.getSystemHandle(), &margins);
« Last Edit: April 23, 2017, 04:03:25 pm by kneksacke »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Ignore mouse input
« Reply #1 on: April 23, 2017, 05:37:19 pm »
You can simply choose to ignore the mouse event.
Maybe there's a hacky WinAPI way, but I wouldn't know of that. :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Ignore mouse input
« Reply #2 on: May 02, 2017, 11:49:16 am »
You'll have to modify SFML or attach your own message queue in addition to changing the window style. More information here.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Ignore mouse input
« Reply #3 on: May 03, 2017, 11:10:33 pm »
I suppose the problem here is allowing the window underneath to receive the event as if the window didn't exist. If the "overlay" is on top of a window of your own, you can work out a work to communicate between the two windows.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*