Braste84 Posted April 16, 2023 Share Posted April 16, 2023 (edited) I am using a GUI for some checkboxes and buttons $ScriptEngine = GUICreate("Script Engine", 619, 308, -1523, 321) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitScript") .... GUISetState(@SW_SHOW) But as soon as I create a second GUI as child of the program window I am interacting with, the mouse cursor vanishes in the main GUI. The second GUI is meant as an overlay, whiches moves with the program. $overlay = GUICreate("", 200, 500, 0, 0, $WS_CHILD, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED), $pHandle) GUISetBkColor(0xABCDEF) _WinAPI_SetLayeredWindowAttributes($overlay, 0xABCDEF) GUISetState() _GDIPlus_Startup() $overlayGraphic = _GDIPlus_GraphicsCreateFromHWND($overlay) _GDIPlus_GraphicsSetTextRenderingHint ($overlayGraphic, 3) Edited April 16, 2023 by Braste84 Link to comment Share on other sites More sharing options...
TimRude Posted April 16, 2023 Share Posted April 16, 2023 Post working example code that replicates the problem so someone can see exactly what you're talking about without having to reinvent the wheel. Link to comment Share on other sites More sharing options...
Solution Braste84 Posted April 17, 2023 Author Solution Share Posted April 17, 2023 (edited) Nevermind. I don't have the time to make a working example code at the moment and I won't post my complete script here. I switched from $overlay = GUICreate("", 200, 500, 0, 0, $WS_CHILD, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED), $pHandle) to $overlay = GUICreate("", 200, 500, 0, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED)) and do the positioning of the overlay myself. Now everything works. Edited April 17, 2023 by Braste84 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now