summaryrefslogtreecommitdiff
path: root/tipper/message_pump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tipper/message_pump.cpp')
-rw-r--r--tipper/message_pump.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp
index d891a33..ae679c0 100644
--- a/tipper/message_pump.cpp
+++ b/tipper/message_pump.cpp
@@ -2,6 +2,7 @@
#include "message_pump.h"
#include "popwin.h"
#include "options.h"
+#include "str_utils.h"
HMODULE hUserDll;
BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0;
@@ -122,12 +123,7 @@ int ShowTip(WPARAM wParam, LPARAM lParam) {
clcit2->text = 0;
if(wParam) { // wParam is char pointer containing text - e.g. status bar tooltip
- int size = MultiByteToWideChar(code_page, 0, (char *)wParam, -1, 0, 0);
- if(size) {
- clcit2->text = (wchar_t *)malloc(size * sizeof(wchar_t));
- MultiByteToWideChar(code_page, 0, (char *)wParam, -1, clcit2->text, size);
- GetCursorPos(&clcit2->ptCursor); // cursor pos broken?
- }
+ clcit2->text = a2t((char *)wParam);
}
PostMPMessage(MUM_CREATEPOPUP, 0, (LPARAM)clcit2);
@@ -164,12 +160,23 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) {
ACKDATA *ack = (ACKDATA *)lParam;
char *szMsg = (char *)ack->lParam;
if(ack->type == ACKTYPE_AWAYMSG && ack->result == ACKRESULT_SUCCESS && szMsg) {
+ /*
int size = MultiByteToWideChar(code_page, 0, szMsg, -1, 0, 0);
if(size > 1) {
wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
MultiByteToWideChar(code_page, 0, (char *) szMsg, -1, msg, size);
PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
}
+ */
+ /*
+ int size = MultiByteToWideChar(CP_UTF8, 0, szMsg, -1, 0, 0);
+ if(size > 1) {
+ wchar_t *msg = (wchar_t *)malloc(size * sizeof(wchar_t));
+ MultiByteToWideChar(CP_UTF8, 0, (char *) szMsg, -1, msg, size);
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)msg);
+ }
+ */
+ PostMPMessage(MUM_GOTSTATUS, (WPARAM)ack->hContact, (LPARAM)u2t(szMsg));
}
return 0;
}