diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-16 16:49:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-16 16:49:08 +0000 |
commit | 365183d00b2eaad4d7c1a38bf346c6635e2c8031 (patch) | |
tree | 8b2442a7cae62d9d25fa2684431c7bae02792961 /plugins/UserInfoEx | |
parent | 2def8505c21d5f20a845a90992629d072fd7250a (diff) |
fix for conversion from HBRUSH to BOOL
git-svn-id: http://svn.miranda-ng.org/main/trunk@14967 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp | 3 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 64 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/psp_base.cpp | 7 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_refreshci.cpp | 19 |
5 files changed, 42 insertions, 53 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index cd4b185f01..bbfa76552a 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -569,7 +569,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case WM_CTLCOLORSTATIC:
if ((HWND)lParam == cbex->hEdit)
- return (BOOL)GetSysColor(COLOR_WINDOW);
+ return (INT_PTR)GetSysColor(COLOR_WINDOW);
return FALSE;
/**
* name: WM_SETICON
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index 5d242d12a5..b18a8761c3 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -55,14 +55,11 @@ INT_PTR CALLBACK DlgProcProgress(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPar }
case WM_CTLCOLORSTATIC:
switch (GetWindowLongPtr((HWND)lParam, GWLP_ID)) {
- //case IDC_HEADERBAR
case STATIC_WHITERECT:
case TXT_SETTING:
case IDC_PROGRESS:
case TXT_CONTACT:
case IDC_PROGRESS2:
- //case ICO_DLGLOGO:
- //case IDC_INFO:
SetBkColor((HDC)wParam, RGB(255, 255, 255));
return (INT_PTR)GetStockObject(WHITE_BRUSH);
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index c7f473e83f..692cf79e9d 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -25,9 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- switch (msg)
- {
- case WM_INITDIALOG:
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hDlg);
{
const ICONCTRL idIcon[] = {
{ ICO_DLG_EXPORT, WM_SETICON, NULL },
@@ -38,39 +38,39 @@ INT_PTR CALLBACK DlgProc_DataHistory(HWND hDlg, UINT msg, WPARAM wParam, LPARAM const int numIconsToSet = db_get_b(NULL, MODNAME, SET_ICONS_BUTTONS, 1) ? _countof(idIcon) : 2;
IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet);
- TranslateDialogDefault(hDlg);
SendDlgItemMessage(hDlg, IDOK, BUTTONTRANSLATE, NULL, NULL);
SendDlgItemMessage(hDlg, IDCANCEL, BUTTONTRANSLATE, NULL, NULL);
- break;
}
- case WM_CTLCOLORSTATIC:
- switch (GetWindowLongPtr((HWND)lParam, GWLP_ID)) {
- case STATIC_WHITERECT:
- case ICO_DLGLOGO:
- case IDC_INFO:
- SetBkColor((HDC)wParam, RGB(255, 255, 255));
- return (INT_PTR)GetStockObject(WHITE_BRUSH);
- }
- return FALSE;
- case WM_COMMAND:
- if (HIWORD(wParam) == BN_CLICKED) {
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- EndDialog(hDlg, 0);
- break;
- case IDOK: {
- WORD hiWord = 0;
-
- if (IsDlgButtonChecked(hDlg, IDC_CHECK1))
- hiWord |= EXPORT_DATA;
- if (IsDlgButtonChecked(hDlg, IDC_CHECK2))
- hiWord |= EXPORT_HISTORY;
- EndDialog(hDlg, (INT_PTR)MAKELONG(IDOK, hiWord));
- break;
- }
- }
+ break;
+
+ case WM_CTLCOLORSTATIC:
+ switch (GetWindowLongPtr((HWND)lParam, GWLP_ID)) {
+ case STATIC_WHITERECT:
+ case ICO_DLGLOGO:
+ case IDC_INFO:
+ SetBkColor((HDC)wParam, RGB(255, 255, 255));
+ return (INT_PTR)GetStockObject(WHITE_BRUSH);
+ }
+ return FALSE;
+
+ case WM_COMMAND:
+ if (HIWORD(wParam) == BN_CLICKED) {
+ switch (LOWORD(wParam)) {
+ case IDCANCEL:
+ EndDialog(hDlg, 0);
+ break;
+
+ case IDOK:
+ WORD hiWord = 0;
+ if (IsDlgButtonChecked(hDlg, IDC_CHECK1))
+ hiWord |= EXPORT_DATA;
+ if (IsDlgButtonChecked(hDlg, IDC_CHECK2))
+ hiWord |= EXPORT_HISTORY;
+ EndDialog(hDlg, (INT_PTR)MAKELONG(IDOK, hiWord));
+ break;
}
- break;
+ }
+ break;
}
return FALSE;
}
diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp index 9437f693f3..98dd6d7b2c 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -43,10 +43,9 @@ INT_PTR CALLBACK PSPBaseProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) // set propertysheet page's background white in aero mode
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORDLG:
- {
- if (IsAeroMode())
- return (INT_PTR)GetStockBrush(WHITE_BRUSH);
- } break;
+ if (IsAeroMode())
+ return (INT_PTR)GetStockBrush(WHITE_BRUSH);
+ break;
// Set text color of edit boxes according to the source of information they display.
case WM_CTLCOLOREDIT:
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index ad21ac36f9..c7365289f7 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -233,8 +233,7 @@ class CDlgUpdProgress : public CUpdProgress **/
static INT_PTR CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- switch (uMsg)
- {
+ switch (uMsg) {
case WM_INITDIALOG:
{
const ICONCTRL idIcon[] = {
@@ -253,19 +252,13 @@ class CDlgUpdProgress : public CUpdProgress return TRUE;
case WM_CTLCOLORSTATIC:
- {
- switch (GetWindowLongPtr((HWND)lParam, GWLP_ID))
- {
- case STATIC_WHITERECT:
- case IDC_INFO:
- {
- SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
- return GetSysColor(COLOR_WINDOW);
- }
- }
+ switch (GetWindowLongPtr((HWND)lParam, GWLP_ID)) {
+ case STATIC_WHITERECT:
+ case IDC_INFO:
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
+ return GetSysColor(COLOR_WINDOW);
}
return FALSE;
-
}
return CUpdProgress::DefWndProc((CUpdProgress *) GetUserData(hWnd), hWnd, uMsg, wParam, lParam);
}
|