Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
O.P. DisplayToastW bug?
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.
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
O.P. RE: DisplayToastW bug?
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.
lol . 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" .