Hi,
I've created a window that I would like to be solid red with a message and a button to click to view a log file.
GUICreate ("program",300,200,-1,-1,$WS_SYSMENU)
GUICtrlCreateLabel (@LF & "Program FAILED.",1,1,300,200,$SS_CENTER)
GUICtrlSetFont (-1,20)
GUICtrlSetColor (-1,0xffffff)
GUICtrlSetBkColor (-1,0xff0000)
$ViewLog = GUICtrlCreateButton ("View Log",130,125,-1,-1,-1)
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg = $ViewLog then
RunWait(@ComSpec & " /c notepad c:\logfile.log", "", @SW_HIDE)
ExitLoop
EndIf
Wend
The problem is that the label seems to "cover up" the button so that I can't click on it, even though it's completely visible. I found this out by decreasing the size of the label until it was above the button and then I could click on it.
I also tried putting GUICtrlCreateButton before GUICtrlCreateLabel, which even made is stranger; the button wasn't visible until the mouse was over it, and then it became visable and clickable. Very weird.
Is there a different way to make the window red? Is there a way to force the button to be "on top" of the label so it's clickable?
Thanks.