From 5129d51c859daf669ef01099a563621f85037405 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 31 Dec 2014 21:32:42 +0000 Subject: automated conversion mode git-svn-id: http://svn.miranda-ng.org/main/trunk@11702 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/DbChecker/src/progress.cpp | 72 ++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 35 deletions(-) (limited to 'plugins/DbChecker/src/progress.cpp') diff --git a/plugins/DbChecker/src/progress.cpp b/plugins/DbChecker/src/progress.cpp index a01591b805..9a20a9ca0c 100644 --- a/plugins/DbChecker/src/progress.cpp +++ b/plugins/DbChecker/src/progress.cpp @@ -112,45 +112,45 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM return TRUE; case WM_MEASUREITEM: - { - LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam; - mis->itemWidth = listWidth; - mis->itemHeight = fontHeight; - } - return TRUE; + { + LPMEASUREITEMSTRUCT mis = (LPMEASUREITEMSTRUCT)lParam; + mis->itemWidth = listWidth; + mis->itemHeight = fontHeight; + } + return TRUE; case WM_DRAWITEM: - { - LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; TCHAR str[256]; - int bold = 0; - HFONT hoFont = NULL; - if ((int)dis->itemID == -1) break; - SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str); - switch (dis->itemData & STATUS_CLASSMASK) { - case STATUS_MESSAGE: - SetTextColor(dis->hDC, RGB(0, 0, 0)); - break; - case STATUS_WARNING: - SetTextColor(dis->hDC, RGB(192, 128, 0)); - break; - case STATUS_ERROR: - SetTextColor(dis->hDC, RGB(192, 0, 0)); - break; - case STATUS_FATAL: - bold = 1; - SetTextColor(dis->hDC, RGB(192, 0, 0)); - break; - case STATUS_SUCCESS: - bold = 1; - SetTextColor(dis->hDC, RGB(0, 192, 0)); - break; + { + LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; + int bold = 0; + HFONT hoFont = NULL; + if ((int)dis->itemID == -1) break; + SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str); + switch (dis->itemData & STATUS_CLASSMASK) { + case STATUS_MESSAGE: + SetTextColor(dis->hDC, RGB(0, 0, 0)); + break; + case STATUS_WARNING: + SetTextColor(dis->hDC, RGB(192, 128, 0)); + break; + case STATUS_ERROR: + SetTextColor(dis->hDC, RGB(192, 0, 0)); + break; + case STATUS_FATAL: + bold = 1; + SetTextColor(dis->hDC, RGB(192, 0, 0)); + break; + case STATUS_SUCCESS: + bold = 1; + SetTextColor(dis->hDC, RGB(0, 192, 0)); + break; + } + if (bold) hoFont = (HFONT)SelectObject(dis->hDC, hBoldFont); + ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED | ETO_OPAQUE, &dis->rcItem, str, (UINT)_tcslen(str), NULL); + if (bold) SelectObject(dis->hDC, hoFont); } - if (bold) hoFont = (HFONT)SelectObject(dis->hDC, hBoldFont); - ExtTextOut(dis->hDC, dis->rcItem.left, dis->rcItem.top, ETO_CLIPPED | ETO_OPAQUE, &dis->rcItem, str, (UINT)_tcslen(str), NULL); - if (bold) SelectObject(dis->hDC, hoFont); - } - return TRUE; + return TRUE; case WM_PROCESSINGDONE: SetProgressBar(1000); @@ -159,6 +159,8 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM EnableWindow(GetDlgItem(GetParent(hdlg), IDOK), FALSE); SetDlgItemText(GetParent(hdlg), IDCANCEL, TranslateT("&Finish")); bShortModeDone = true; + if (bAutoExit) + PostMessage(GetParent(hdlg), WM_COMMAND, IDCANCEL, 0); } else { AddToStatus(STATUS_SUCCESS, TranslateT("Click Next to continue")); -- cgit v1.2.3