Just thought I'd close out this thread with the finished product:
Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
Local $nNotifyCode = BitShift($wParam, 16)
Local $nID = BitAND($wParam, 0x0000FFFF)
Local $hCtrl = $lParam
Local $Letter
If $nNotifyCode = $BN_DBLCLK Then
For $a = 1 To 26
If $nID = $Alphabet[$a] Then
$AlphaState[$a] += 1
If $AlphaState[$a] > 2 Then $AlphaState[$a] = 0
SetAlphaColor($a, $Alphabet[$a])
$ShowLetters = True
Return $GUI_RUNDEFMSG
EndIf
Next
For $a = 1 To 20
For $b = 1 To 5
If $nID = $LetterButtonArray[$a][$b] Then
$Letter = Asc(GUICtrlRead($LetterButtonArray[$a][$b])) - 64
$AlphaState[$Letter] += 1
If $AlphaState[$Letter] = 3 Then $AlphaState[$Letter] = 0
SetAlphaColor($Letter, $Alphabet[$Letter])
$ShowLetters = True
Return $GUI_RUNDEFMSG
EndIf
Next
Next
EndIf
Return $GUI_RUNDEFMSG
EndFunc
Works like a charm.
Thank you very much for pointing me in the right direction and for your excellent example. I learned a lot.
[left][hr]
$mood = "whimsy"
$mode = "confused"
$randomChaos = True
Do
Something()
Until $Tired
Recommended Posts
zorphnog
You need to look at GUIRegisterMsg and the BN_DBLCLK notification. Here's an example:
Link to comment
Share on other sites
Topher
Thank you
Working on adapting it to multiple buttons now. I think I see how.
[left][hr]
[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left]Link to comment
Share on other sites
Topher
Just thought I'd close out this thread with the finished product:
Works like a charm.
Thank you very much for pointing me in the right direction and for your excellent example. I learned a lot.
[left][hr]
[/left][left]Reflex (Arcade game)[/left][left]IX (Board game)[/left][left]The Word Game (Word game)[/left][left]Plastic Sliding Squares Puzzle (Puzzle)[/left]Link to comment
Share on other sites