From e3cefc7b6ca803e3f87dbadae54a110332778490 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Jul 2012 22:41:06 +0000 Subject: - first of the /Core standard plugins; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/utils/resizer.cpp | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/modules/utils/resizer.cpp') diff --git a/src/modules/utils/resizer.cpp b/src/modules/utils/resizer.cpp index a443fef0ae..0f9b0b418f 100644 --- a/src/modules/utils/resizer.cpp +++ b/src/modules/utils/resizer.cpp @@ -48,7 +48,7 @@ typedef struct { INT_PTR ResizeDialog(WPARAM, LPARAM lParam) { - UTILRESIZEDIALOG *urd=(UTILRESIZEDIALOG*)lParam; + UTILRESIZEDIALOG *urd = (UTILRESIZEDIALOG*)lParam; HDWP hDwp; int i; DLGITEMTEMPLATE *pItem = NULL; @@ -62,14 +62,14 @@ INT_PTR ResizeDialog(WPARAM, LPARAM lParam) int extendedDlg, itemCount; if (urd == NULL || urd->cbSize != sizeof(UTILRESIZEDIALOG)) return 1; - pTemplate=(DLGTEMPLATE*)LockResource(LoadResource(urd->hInstance, FindResourceA(urd->hInstance, urd->lpTemplate, MAKEINTRESOURCEA(5)))); - pTemplateEx=(START_OF_DLGTEMPLATEEX*)pTemplate; - extendedDlg=pTemplateEx->signature == 0xFFFF; + pTemplate = (DLGTEMPLATE*)LockResource(LoadResource(urd->hInstance, FindResourceA(urd->hInstance, urd->lpTemplate, MAKEINTRESOURCEA(5)))); + pTemplateEx = (START_OF_DLGTEMPLATEEX*)pTemplate; + extendedDlg = pTemplateEx->signature == 0xFFFF; if (extendedDlg && pTemplateEx->dlgVer != 1) return 1; - if (extendedDlg) pWord=(PWORD)(pTemplateEx+1); - else pWord=(PWORD)(pTemplate+1); + if (extendedDlg) pWord = (PWORD)(pTemplateEx+1); + else pWord = (PWORD)(pTemplate+1); if (*pWord == 0xFFFF) pWord+=2; else while (*pWord++); //menu if (*pWord == 0xFFFF) pWord+=2; else while (*pWord++); //class while (*pWord++); //title @@ -86,36 +86,36 @@ INT_PTR ResizeDialog(WPARAM, LPARAM lParam) } } - urc.cbSize=sizeof(UTILRESIZECONTROL); - rc.left=0; rc.top=0; - if (extendedDlg) {rc.right=pTemplateEx->cx; rc.bottom=pTemplateEx->cy;} - else {rc.right=pTemplate->cx; rc.bottom=pTemplate->cy;} + urc.cbSize = sizeof(UTILRESIZECONTROL); + rc.left = 0; rc.top = 0; + if (extendedDlg) {rc.right = pTemplateEx->cx; rc.bottom = pTemplateEx->cy;} + else {rc.right = pTemplate->cx; rc.bottom = pTemplate->cy;} MapDialogRect(urd->hwndDlg, &rc); - urc.dlgOriginalSize.cx=rc.right; urc.dlgOriginalSize.cy=rc.bottom; + urc.dlgOriginalSize.cx = rc.right; urc.dlgOriginalSize.cy = rc.bottom; GetClientRect(urd->hwndDlg, &rc); - urc.dlgNewSize.cx=rc.right; urc.dlgNewSize.cy=rc.bottom; + urc.dlgNewSize.cx = rc.right; urc.dlgNewSize.cy = rc.bottom; - if (extendedDlg) itemCount=pTemplateEx->cDlgItems; - else itemCount=pTemplate->cdit; - hDwp=BeginDeferWindowPos(itemCount); + if (extendedDlg) itemCount = pTemplateEx->cDlgItems; + else itemCount = pTemplate->cdit; + hDwp = BeginDeferWindowPos(itemCount); for (i=0;iid; - urc.rcItem.left=pItemEx->x; urc.rcItem.top=pItemEx->y; - urc.rcItem.right=urc.rcItem.left+pItemEx->cx; urc.rcItem.bottom=urc.rcItem.top+pItemEx->cy; + urc.wId = pItemEx->id; + urc.rcItem.left = pItemEx->x; urc.rcItem.top = pItemEx->y; + urc.rcItem.right = urc.rcItem.left+pItemEx->cx; urc.rcItem.bottom = urc.rcItem.top+pItemEx->cy; } else { - pItem=(DLGITEMTEMPLATE*)pWord; - pWord=(PWORD)(pItem+1); + pItem = (DLGITEMTEMPLATE*)pWord; + pWord = (PWORD)(pItem+1); - urc.wId=pItem->id; - urc.rcItem.left=pItem->x; urc.rcItem.top=pItem->y; - urc.rcItem.right=urc.rcItem.left+pItem->cx; urc.rcItem.bottom=urc.rcItem.top+pItem->cy; + urc.wId = pItem->id; + urc.rcItem.left = pItem->x; urc.rcItem.top = pItem->y; + urc.rcItem.right = urc.rcItem.left+pItem->cx; urc.rcItem.bottom = urc.rcItem.top+pItem->cy; } if (*pWord == 0xFFFF) pWord+=2; else while (*pWord++); //menu if (*pWord == 0xFFFF) pWord+=2; else while (*pWord++); //class @@ -124,7 +124,7 @@ INT_PTR ResizeDialog(WPARAM, LPARAM lParam) if (urc.wId == 65535) continue; //using this breaks the dwp, so just ignore it MapDialogRect(urd->hwndDlg, &urc.rcItem); - procResult=(urd->pfnResizer)(urd->hwndDlg, urd->lParam, &urc); + procResult = (urd->pfnResizer)(urd->hwndDlg, urd->lParam, &urc); if (procResult&RD_ANCHORX_RIGHT) { urc.rcItem.left+=urc.dlgNewSize.cx-urc.dlgOriginalSize.cx; urc.rcItem.right+=urc.dlgNewSize.cx-urc.dlgOriginalSize.cx; -- cgit v1.2.3