diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-21 12:01:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-21 12:01:49 +0000 |
commit | e865872b4ef16b6e40cfe868843f1070fa3a239b (patch) | |
tree | 0710f76e005c25ce151c46015c0853af6101d2cc /protocols/JabberG/src/jabber_iqid_muc.cpp | |
parent | 87cf54594168e5579bbb852bcb4aaae3fefa3b89 (diff) |
- resizer moved to mir_core, because it uses hard-coded windows structures;
- MS_UTILS_RESIZEDIALOG replaced with a short call of Utils_ResizeDialog;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid_muc.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_iqid_muc.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index cd982c3515..17307fbbc6 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -167,7 +167,8 @@ static int sttJidListResizer(HWND, LPARAM, UTILRESIZECONTROL *urc) static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- JABBER_MUC_JIDLIST_INFO* dat = (JABBER_MUC_JIDLIST_INFO*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ JABBER_MUC_JIDLIST_INFO *dat = (JABBER_MUC_JIDLIST_INFO*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
switch(msg) {
case WM_INITDIALOG:
@@ -177,7 +178,6 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w TranslateDialogDefault(hwndDlg);
- HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
GetClientRect(hwndList, &rc);
//rc.right -= GetSystemMetrics(SM_CXVSCROLL);
@@ -212,26 +212,16 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w Utils_RestoreWindowPosition(hwndDlg, NULL, dat->ppro->m_szModuleName, "jidListWnd_");
}
return TRUE;
+
case WM_SIZE:
- {
- UTILRESIZEDIALOG urd = {0};
- urd.cbSize = sizeof(urd);
- urd.hInstance = hInst;
- urd.hwndDlg = hwndDlg;
- urd.lpTemplate = MAKEINTRESOURCEA(IDD_JIDLIST);
- urd.pfnResizer = sttJidListResizer;
- CallService(MS_UTILS_RESIZEDIALOG, 0, (LPARAM)&urd);
-
- RECT listrc;
- LVCOLUMN lvc;
- HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
- GetClientRect(hwndList, &listrc);
- lvc.mask = LVCF_WIDTH;
- //listrc.right -= GetSystemMetrics(SM_CXVSCROLL);
- lvc.cx = listrc.right - 20;
- SendMessage(hwndList, LVM_SETCOLUMN, 0, (LPARAM)&lvc);
- break;
- }
+ Utils_ResizeDialog(hwndDlg, hInst, MAKEINTRESOURCEA(IDD_JIDLIST), sttJidListResizer);
+
+ RECT listrc;
+ LVCOLUMN lvc;
+ GetClientRect(hwndList, &listrc);
+ lvc.mask = LVCF_WIDTH;
+ lvc.cx = listrc.right - 20;
+ SendMessage(hwndList, LVM_SETCOLUMN, 0, (LPARAM)&lvc);
break;
case WM_JABBER_REFRESH:
@@ -388,7 +378,6 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc(HWND hwndDlg, UINT msg, WPARAM w LVITEM lvi;
// Free lParam of the displayed list items
- HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
int count = ListView_GetItemCount(hwndList);
lvi.mask = LVIF_PARAM;
lvi.iSubItem = 0;
|