diff options
Diffstat (limited to 'plugins/Weather/src/weather_mwin.cpp')
-rw-r--r-- | plugins/Weather/src/weather_mwin.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 6ccbfb19f0..8444644f7f 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -30,7 +30,7 @@ HGENMENU hMwinMenu; typedef struct
{
- HANDLE hContact;
+ HCONTACT hContact;
HWND hAvt;
BOOL haveAvatar;
} MWinDataType;
@@ -47,7 +47,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara data = (MWinDataType*)mir_calloc(sizeof(MWinDataType));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
- data->hContact = (HANDLE)((LPCREATESTRUCT)lParam)->lpCreateParams;
+ data->hContact = (HCONTACT)((LPCREATESTRUCT)lParam)->lpCreateParams;
data->hAvt = CreateWindow(AVATAR_CONTROL_CLASS, TEXT(""), WS_CHILD,
0, 0, opt.AvatarSize, opt.AvatarSize, hwnd, NULL, hInst, 0);
if (data->hAvt) SendMessage(data->hAvt, AVATAR_SETCONTACT, 0, (LPARAM)data->hContact);
@@ -246,7 +246,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return(TRUE);
}
-static void addWindow(HANDLE hContact)
+static void addWindow(HCONTACT hContact)
{
DBVARIANT dbv;
db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
@@ -273,7 +273,7 @@ static void addWindow(HANDLE hContact) db_set_b(hContact, "CList", "Hidden", TRUE);
}
-void removeWindow(HANDLE hContact)
+void removeWindow(HCONTACT hContact)
{
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
@@ -284,7 +284,7 @@ void removeWindow(HANDLE hContact) db_unset(hContact, "CList", "Hidden");
}
-void UpdateMwinData(HANDLE hContact)
+void UpdateMwinData(HCONTACT hContact)
{
HWND hwnd = WindowList_Find(hMwinWindowList, hContact);
if (hwnd != NULL)
@@ -294,11 +294,11 @@ void UpdateMwinData(HANDLE hContact) INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam)
{
- BOOL addwnd = WindowList_Find(hMwinWindowList, (HANDLE)wParam) == NULL;
+ BOOL addwnd = WindowList_Find(hMwinWindowList, (HCONTACT)wParam) == NULL;
if (addwnd)
- addWindow((HANDLE)wParam);
+ addWindow((HCONTACT)wParam);
else
- removeWindow((HANDLE)wParam);
+ removeWindow((HCONTACT)wParam);
return 0;
}
@@ -307,7 +307,7 @@ int BuildContactMenu(WPARAM wparam,LPARAM lparam) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS |
- (db_get_dw((HANDLE)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0);
+ (db_get_dw((HCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hMwinMenu, &mi);
return 0;
}
@@ -372,7 +372,7 @@ void InitMwin(void) strcpy(fontid.prefix, "fnt1");
FontRegisterT(&fontid);
- for (HANDLE hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
+ for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
addWindow(hContact);
@@ -381,7 +381,7 @@ void InitMwin(void) void DestroyMwin(void)
{
- for (HANDLE hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
+ for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
|