diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
commit | 92beff959051eec8d60e4e146aa3d8a13bee9fea (patch) | |
tree | b06ceb3079028d38f6d0f2481a5ab62b05e83e80 /protocols/Xfire/src/pwd_dlg.cpp | |
parent | 8ef64da1b7cc3ef5026ab2dc80e7e0fd88971d59 (diff) |
XFire: Reformat sources
git-svn-id: http://svn.miranda-ng.org/main/trunk@11134 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/pwd_dlg.cpp')
-rw-r--r-- | protocols/Xfire/src/pwd_dlg.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/protocols/Xfire/src/pwd_dlg.cpp b/protocols/Xfire/src/pwd_dlg.cpp index 256c30eac7..c9e0316627 100644 --- a/protocols/Xfire/src/pwd_dlg.cpp +++ b/protocols/Xfire/src/pwd_dlg.cpp @@ -3,49 +3,49 @@ #include "stdafx.h"
#include "pwd_dlg.h"
-char password[256]="";
+char password[256] = "";
INT_PTR CALLBACK DlgPwProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
+ {
+ SetWindowText(hwndDlg, LPGENT("Please enter server password..."));
+ TranslateDialogDefault(hwndDlg);
+ SendMessage(hwndDlg, WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
+ return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ if (LOWORD(wParam) == IDOK)
{
- SetWindowText(hwndDlg, LPGENT("Please enter server password..."));
- TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
+ GetDlgItemTextA(hwndDlg, IDC_NICKNAME, password, sizeof(password));
+ EndDialog(hwndDlg, TRUE);
return TRUE;
}
- case WM_COMMAND:
+ else if (LOWORD(wParam) == IDCANCEL)
{
- if (LOWORD(wParam) == IDOK)
- {
- GetDlgItemTextA(hwndDlg,IDC_NICKNAME,password,sizeof(password));
- EndDialog(hwndDlg,TRUE);
- return TRUE;
- }
- else if (LOWORD(wParam) == IDCANCEL)
- {
- EndDialog(hwndDlg,FALSE);
- return FALSE;
- }
+ EndDialog(hwndDlg, FALSE);
+ return FALSE;
}
}
+ }
return FALSE;
}
BOOL ShowPwdDlg(char* pw) {
//kein gültiges ziel für das eingegebene passwort
- if (&pw==NULL)
+ if (&pw == NULL)
return FALSE;
-
- if (DialogBox(hinstance,MAKEINTRESOURCE(IDD_SETNICKNAME),NULL,DlgPwProc))
+
+ if (DialogBox(hinstance, MAKEINTRESOURCE(IDD_SETNICKNAME), NULL, DlgPwProc))
{
//passwort kopieren
if (*password == 0)
return FALSE;
- strcpy_s(pw,255,password);
+ strcpy_s(pw, 255, password);
return TRUE;
}
|