jmeneses wrote: ↑11 Feb 2022, 02:45
Hi ibieel, another way
Code: Select all
#SingleInstance, Force
OnMessage(0x200,"MouseHover")
Gui, Add, Picture , HwndIdIMAGE x15 y15 w50 h50, ERROR.jpg
Gui, Show, w200 h200, Test
return
MouseHover(wParam, lParam, msg, hwnd) {
Global IdIMAGE
MouseGetPos, , , , CurrControl ,2
If (CurrControl=IdIMAGE) {
ToolTip, Description `nDescription1 `nDescription2 `nDescription3
Return
}
ToolTip
}
the code worked fine.
but I didn't understand the part of: "HwndIdIMAGE" and "Global IdIMAGE"
how did the value of HwndIdIMAGE go to IdIMAGE?
I can't see in the code the part where one value is inserted into the other.
I'm trying to do it for more than 1 image and I couldn't
I would like that depending on the image the mouse is in, it sends itself a different tooltip.
can you help me?
Code: Select all
#SingleInstance, Force
OnMessage(0x200,"MouseHover")
Gui, Add, Picture , HwndIdIMAGE x15 y15 w50 h50, ERROR.jpg
Gui, Add, Picture, HwndIdIMAGE x100 y100 w50 h50, ERROR.jpg
Gui, Show, w200 h200, Test
return
MouseHover() {
Global IdIMAGE
MouseGetPos, , , , CurrControl ,2
If (CurrControl=IdIMAGE) {
ToolTip, Description `nDescription1 `nDescription2 `nDescription3
Return
}
ToolTip
}