=sinister= Posted March 24, 2007 Share Posted March 24, 2007 I know the set pixel function using dllcall and all, but if another color is written to that certain pixel, it goes away. Is it possible to "lock" the set pixel function so that if another color replaces that pixel, that it won't set? And I don't want and loop because it looks to glitchy to those windows that always set every pixel to a different color. Thanks. Link to comment Share on other sites More sharing options...
jvanegmond Posted March 24, 2007 Share Posted March 24, 2007 (edited) Maybe you can make an 1x1 Window ($WS_POPUP as style and $WS_EX_TOOLWINDOW as extended style.) with that color.Edit:and remember to put it on top.. Edited March 24, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
=sinister= Posted March 24, 2007 Author Share Posted March 24, 2007 The only problem with that is that I want to use the pixels in a game, and creating a window usually minimizes the game. =\ Link to comment Share on other sites More sharing options...
=sinister= Posted March 25, 2007 Author Share Posted March 25, 2007 (edited) Actually, your method has come to use to me, but I have 1 more question before I get off your tail =P. So I have the GUI: #include <GUIConstants.au3> $GUI = GUICreate("My GUI", 50, 50, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend But how do I get the box to reapear if another window pops up? I tried: #include <GUIConstants.au3> $GUI = GUICreate("My GUI", 50, 50, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() GUISetState (@SW_Show, $GUI) If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend but that didn't work. --Edit-- GUISetState(@SW_Restore) does the trick Edited March 25, 2007 by =sinister= Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 Actually, your method has come to use to me, but I have 1 more question before I get off your tail =P. So I have the GUI: #include <GUIConstants.au3> $GUI = GUICreate("My GUI", 50, 50, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend But how do I get the box to reapear if another window pops up? I tried: #include <GUIConstants.au3> $GUI = GUICreate("My GUI", 50, 50, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() GUISetState (@SW_Show, $GUI) If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend but that didn't work. --Edit-- GUISetState(@SW_Restore) does the trick #include <GUIConstants.au3> $GUI = GUICreate("My GUI", 50, 50, -1, -1, $WS_POPUP, $WS_EX_TOOLWINDOW); will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) WinSetOnTop($GUI,"",1); this. While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend github.com/jvanegmond Link to comment Share on other sites More sharing options...
=sinister= Posted March 25, 2007 Author Share Posted March 25, 2007 Thats much better than what I did. Thanks! Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 Thats much better than what I did. Thanks!No problem. I was impressed with your solution.. github.com/jvanegmond 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