Shoutbox

DisplayToastW bug? - 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: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: DisplayToastW bug? (/showthread.php?tid=43475)

DisplayToastW bug? by RaceProUK on 04-23-2005 at 01:41 PM

I've just converted Phoenix to Unicode (v2 will support all them fancy Eastern characters now), but the toasts are broken. While eventually I will be doing my own, I'm using Plus's DisplayToastW in the meantime.

Thing is, I can pass any WCHAR* to it I like, and no matter whether it's a BSTR (BSTR = OLECHAR* = WCHAR*), WCHAR*, or L"Text", it refuses to display more than one character of the string.


RE: DisplayToastW bug? by Mnjul on 04-23-2005 at 02:23 PM

DisplayToastW has always been working fine (for Hopper)...there might be something wrong with your string manipulation :)


RE: DisplayToastW bug? by RaceProUK on 04-23-2005 at 02:41 PM

It happenes even when I pass a string like L"Test". If I pass a string like that to MessageBoxW, it works fine, but it won't for DisplayToastW.


RE: DisplayToastW bug? by Mnjul on 04-23-2005 at 03:43 PM

That sounds strange :S

Well I forgot to say that I've modified DisplayToastW a little... I changed

code:
    UINT nMsg = RegisterWindowMessage("MessengerPlus_DisplayToast");


to

code:
    UINT nMsg = RegisterWindowMessageW(L"MessengerPlus_DisplayToast");


I don't really think it should correct your problem, but why not give it a try? :)
RE: DisplayToastW bug? by RaceProUK on 04-23-2005 at 04:40 PM

* RaceProUK :bow: W
I should have known it'd be as simple as that :)

Note to Patchou: Ws and Ls help with Unicode ;)

Update: Nope, didn't work.
Doesn't help I haven't got Internet at the moment (using the Hall's computer suite is no substitute).Internet back for now :)


RE: DisplayToastW bug? by RaceProUK on 06-02-2005 at 01:39 PM

I think I now hold the record for looking in the wrong place the whole time. I've found what's wrong with my use of DisplayToastW.
I separated out the code in MPPluginHeader.h among my own header files for more logical organisation of the code. Initially, I wasn't worrying about Unicode, but then switched to it.

Turns out the lParam of 'MessengerPlus_DisplayToast' is FALSE for ANSI, TRUE for Unicode.

:wall:
:wall:
:wall:
:wall:
:wall:
:wall:
:wall:
:wall:
:wall:
:wall:


RE: DisplayToastW bug? by Patchou on 06-05-2005 at 08:59 PM

lol :p. As for RegisterWindowMessageW(), it's not needed as the string parameter that is sent to this function is always the same and not unicode: "MessengerPlus_DisplayToast" :).