I have a strange bug in my application! (Hehe, this is why I am in the Bug Forum.. ^^)
In this mini-gui I open a second gui via button.
On the second button is also only one button. If I press him I would like to see a text and the contents of a variable which is empty (in my original application this can be caused by empty control-contents).
Normally this shouldn't be any problem, but the OnMessage-Function "Tooltipp" influences this handling!
So if I press the little button at the second gui the text is not displayed and instead I see only the name of the Button in it!!!
Code:
Gui, Add, Button, x320 y180 w80 h30 section gTier_Suche, Suche...
Gui, Show, x600 ycenter, Tiere
Process, Exist
PID := ErrorLevel
WinGet, hw_gui, ID, ahk_class AutoHotkeyGUI ahk_pid %PID%
WM_MOUSEMOVE = 0x200
OnMessage(WM_MOUSEMOVE, "Tooltipp")
return
Tier_Suche:
Gui, 2: Add, Button, xs+0 gTier_nach_Kriterien_suchen vTier_nach_Kriterien_suchen Default section, Suche...
Gui, 2: Show, w50 h50, Test
return
Tier_nach_Kriterien_suchen:
msgbox, What happens here? %i%
return
GuiClose:
ExitApp
Tooltipp(WPARAM , LPARAM , Message, HWND)
{
global WM_MOUSEMOVE
if (Message = WM_MOUSEMOVE)
{
if A_GuiControl = Tier_MR ;If I remove this line I get "1" in the messagebox!
{
;Doesn't matter if here are any commands
}
}
}
If I comment out the whole OnMessage-Part it works fine. For testing you can replace the tooltipp-function by this:
Quote:
Tooltipp(WPARAM , LPARAM , Message, HWND)
{
global WM_MOUSEMOVE
}
If I just remove a part of the function the result in the messagebox is always "1":
Code:
Tooltipp(WPARAM , LPARAM , Message, HWND)
{
global WM_MOUSEMOVE
if (Message = WM_MOUSEMOVE)
{
}
}
If anyone knows what happens, please tell me
Thx!
Thalon