diff options
Diffstat (limited to 'plugins/UserInfoEx/src/psp_base.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/psp_base.cpp | 64 |
1 files changed, 29 insertions, 35 deletions
diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp index ebdf9e1e96..77ec44c285 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -56,46 +56,40 @@ INT_PTR CALLBACK PSPBaseProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) return pCtrlList->OnSetTextColour((HWND)lParam, (HDC)wParam);
case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->idFrom) {
- case 0: {
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
- LPSTR pszProto;
-
- switch (((LPNMHDR)lParam)->code) {
- case PSN_RESET: {
- pCtrlList->OnReset();
- } break;
-
- case PSN_INFOCHANGED: {
- if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
- BOOL bChanged = (GetWindowLongPtr(hDlg, DWLP_MSGRESULT)&PSP_CHANGED)|pCtrlList->OnInfoChanged(hContact, pszProto);
- SetWindowLongPtr(hDlg, DWLP_MSGRESULT, bChanged ? PSP_CHANGED : 0);
- }
- } break;
-
- case PSN_APPLY: {
- if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
- pCtrlList->OnApply(hContact, pszProto);
- }
- } break;
- }
- } break;
+ switch (((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ LPSTR pszProto;
+
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_RESET:
+ pCtrlList->OnReset();
+ break;
+
+ case PSN_INFOCHANGED:
+ if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
+ BOOL bChanged = (GetWindowLongPtr(hDlg, DWLP_MSGRESULT)&PSP_CHANGED) | pCtrlList->OnInfoChanged(hContact, pszProto);
+ SetWindowLongPtr(hDlg, DWLP_MSGRESULT, bChanged ? PSP_CHANGED : 0);
+ }
+ break;
+
+ case PSN_APPLY:
+ if (PSGetBaseProto(hDlg, pszProto) && *pszProto)
+ pCtrlList->OnApply(hContact, pszProto);
+ break;
}
- } break;
+ break;
+ }
+ break;
case WM_COMMAND:
- {
- if (!PspIsLocked(hDlg)) {
- pCtrlList->OnChangedByUser(LOWORD(wParam), HIWORD(wParam));
- }
- } break;
+ if (!PspIsLocked(hDlg))
+ pCtrlList->OnChangedByUser(LOWORD(wParam), HIWORD(wParam));
+ break;
case WM_DESTROY:
- {
- // destroy all control objects and the list
- pCtrlList->Release();
- }
+ // destroy all control objects and the list
+ pCtrlList->Release();
}
}
return 0;
|