Shoutbox

problem with PlusWnd::RegisterMessageNotification - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: problem with PlusWnd::RegisterMessageNotification (/showthread.php?tid=84876)

problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 11:22 AM

Hi my problem is that I want to check the mouseposition for a mouseover event so I searched the forum and found something but it didn't work for me. My script:

code:
function gwTemplateCalc(Template, Message)
{
    gw = new gwTemplate(Template);
    gw.load();
    GwSkillbar = MsgPlus.CreateWnd("gwSkillbar.xml", "GwSkillbar");
    GwSkillbar.RegisterMessageNotification(0x200);
   
...
}

function OnGwSkillbarEvent_MessageNotification(PlusWnd,wMessage,wParam,lParam)
{
    Debug.Trace("1");
}

But now the Event is never called..
hope anyone could help me
RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 12:11 PM

matty's reply to [Help] Detecting control mouse-over


RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 12:15 PM

Îf you looked at my code this is exactly what I used.


RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 01:11 PM

quote:
Originally posted by Jana.
Îf you looked at my code this is exactly what I used.
No it really isn't. You need to use a switch in the MessageNotification function you cannot just define code to run because there could be multiple messages. So no you didn't.
RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 01:53 PM

Even if I don't use the switch it should give me the debug message but even that never happens,  and if I use the switch the result is the same, no debug message.
Also it is the only MessageNotification I registered so I have only one message that could show up..


RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 02:01 PM

Does the window get created?

If you trace the events do you see that the event is being called? In the Debug Window, Debug > Trace Event Calls


RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 02:03 PM

Yes, everything in the first function works without problems. Only OnGwSkillbarEvent_MessageNotification seems to be never executed.
How to trace events?


RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 02:06 PM

quote:
Originally posted by matty
In the Debug Window, Debug > Trace Event Calls

RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 02:11 PM

Uh I closed the debug window accidentally yesterday and it never reopened, I now have only the one under the scripteditor and I don't see any options there..


RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 02:12 PM

If you click the scripting icon on the contact list and click Show Script Debugging.


RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 02:20 PM

Ah thanks but it gets never be called and "Trace Event Calls" was activated by default.


RE: problem with PlusWnd::RegisterMessageNotification by matty on 07-17-2008 at 02:31 PM

Post your code, if you don't want to put it here upload it somewhere and PM me the address of it and I will take a look.


RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 02:39 PM

It opens a window if you type a message with a skill template used by Guild Wars like OwAS4YIPmEXC1HvCXr+PEBA


RE: problem with PlusWnd::RegisterMessageNotification by Eljay on 07-17-2008 at 04:29 PM

I have noticed this problem in the past, doesn't seem to be a problem with the script but a problem with the way Plus! itself hooks certain window messages.

If you disable LockOnClick in the XML (set Window/Attributes/LockOnClick to false) it seems to send the notifications correctly.
Obviously you can't move the window about by dragging it then so not much of a solution, sorry :P

Possibly a bug/limitation in Plus!?


RE: problem with PlusWnd::RegisterMessageNotification by Jana. on 07-17-2008 at 05:35 PM

Thanks, that works, its not that nice that you can't move the window but better then that it not work at all.