ioa747 Posted 10 hours ago Posted 10 hours ago I had an interesting accident. (I thing) #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Misc.au3> _ColorsSelection() Func _ColorsSelection() Local $hGUI = GUICreate("Colors Selection", 500, 500, -1, -1, -1) GUISetFont(10) GUICtrlCreateLabel("Red", 10, 10, 101, 17, 0x0002) GUICtrlCreateLabel("Green", 10, 140, 101, 17, 0x0002) Local $Button1 = GUICtrlCreateButton("", 120, 5, 50, 25, 0xFF0000) ; instead of 0x8000 I paste 0xFF0000 GUICtrlSetBkColor(-1, 0xFF0000) Local $Button2 = GUICtrlCreateButton("", 120, 135, 50, 25, 0xFF0000) ; instead of 0x8000 I paste 0xFF0000 GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $Button1 ConsoleWrite("$Button1=" & $Button1 & @CRLF) Case $Button2 ConsoleWrite("$Button2=" & $Button2 & @CRLF) EndSwitch WEnd GUIDelete($hGUI) EndFunc ;==>_ColorsSelection pixelsearch and WildByDesign 2 I know that I know nothing
WildByDesign Posted 9 hours ago Posted 9 hours ago Wow this is really kind of interesting. I don't even understand why it's doing that. ioa747 1
Solution pixelsearch Posted 8 hours ago Solution Posted 8 hours ago (edited) Maybe this explanation ? 1) Button when no style is indicated at creation (-1) , WS_TABSTOP will be forced (help file) Button style becomes 0x50010000 WS_CHILD, WS_VISIBLE, WS_TABSTOP [0x40000000, 'WS_CHILD'] [0x10000000, 'WS_VISIBLE'] [0x00010000, 'WS_TABSTOP'] 2) Button created with 0xFF0000 style Button style becomes 0x50FF0000 WS_CHILD, WS_VISIBLE, WS_OVERLAPPEDWINDOW, WS_VSCROLL, WS_HSCROLL [0x40000000, 'WS_CHILD'] [0x10000000, 'WS_VISIBLE'] [0x00CF0000, 'WS_OVERLAPPEDWINDOW'] [0x00200000, 'WS_VSCROLL'] [0x00100000, 'WS_HSCROLL'] 'WS_OVERLAPPEDWINDOW' means (WS_CAPTION | WS_SYSMENU | WS_SIZEBOX | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) Edited 8 hours ago by pixelsearch typo ioa747 1 "I think you are searching a bug where there is no bug... don't listen to bad advice."
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