summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-08-19 11:27:02 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-08-19 11:27:02 +0000
commit6d05dddfffae5920216ef044e18f46b03a7c3dc6 (patch)
tree730b8c71a5d539742ac6d5a6b07c16df5a59d231
parent1e10085801d12b93c0fb11340e2d495e76b205dd (diff)
hopefully the last unicode fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@1500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Weather/weather_mwin.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/protocols/Weather/weather_mwin.cpp b/protocols/Weather/weather_mwin.cpp
index 1c1d3d3974..ed84bc4d01 100644
--- a/protocols/Weather/weather_mwin.cpp
+++ b/protocols/Weather/weather_mwin.cpp
@@ -165,7 +165,6 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
{
DBVARIANT dbv = {0};
PAINTSTRUCT ps;
- HDC hdc;
LOGFONT lfnt, lfnt1;
COLORREF fntc, fntc1;
COLORREF clr;
@@ -201,7 +200,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
GetClientRect(hwnd, &rc);
- hdc = BeginPaint(hwnd, &ps);
+ HDC hdc = BeginPaint(hwnd, &ps);
if (ServiceExists(MS_SKIN_DRAWGLYPH)) {
SKINDRAWREQUEST rq;
@@ -270,13 +269,11 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
static void addWindow(HANDLE hContact)
{
- DWORD frameID;
-
DBVARIANT dbv;
- DBGetContactSettingString(hContact, WEATHERPROTONAME, "Nick", &dbv);
+ DBGetContactSettingTString(hContact, WEATHERPROTONAME, "Nick", &dbv);
- char winname[512];
- mir_snprintf(winname, SIZEOF(winname), "Weather: %s", dbv.pszVal);
+ TCHAR winname[512];
+ mir_sntprintf(winname, SIZEOF(winname), _T("Weather: %s"), dbv.ptszVal);
DBFreeVariant(&dbv);
HWND hWnd = CreateWindow( _T("WeatherFrame"), _T(""), WS_CHILD | WS_VISIBLE,
@@ -284,13 +281,13 @@ static void addWindow(HANDLE hContact)
WindowList_Add(hMwinWindowList, hWnd, hContact);
CLISTFrame Frame = {0};
- Frame.name = winname;
+ Frame.tname = winname;
Frame.cbSize = sizeof(Frame);
Frame.hWnd = hWnd;
Frame.align = alBottom;
- Frame.Flags = F_VISIBLE|F_NOBORDER;
+ Frame.Flags = F_VISIBLE|F_NOBORDER|F_TCHAR;
Frame.height = 32;
- frameID = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
+ DWORD frameID = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
DBWriteContactSettingDword(hContact, WEATHERPROTONAME, "mwin", frameID);
DBWriteContactSettingByte(hContact, "CList", "Hidden", TRUE);