diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-23 03:22:18 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-23 03:22:18 +0000 |
commit | 6db050eb2d23035c71971cc88219211bbacca23d (patch) | |
tree | 29c91aa26ece9421eb638b33576fd7ad866418c7 /tipper/message_pump.cpp | |
parent | 96101e2721d4cb277bf0b9d02f077dc2dd9087d8 (diff) |
use ansi font services if unicode unavailable
bigfixes to allow pure ansi build
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@56 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/message_pump.cpp')
-rw-r--r-- | tipper/message_pump.cpp | 19 |
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;
}
|