summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp')
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp b/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp
new file mode 100644
index 0000000000..e2668b96d7
--- /dev/null
+++ b/plugins/!NotAdopted/Xfire/xfiretest/pwd_dlg.cpp
@@ -0,0 +1,53 @@
+//fürs nick - dialog
+
+#include "stdafx.h"
+#include "pwd_dlg.h"
+
+char password[256]="";
+
+BOOL CALLBACK DlgPwProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ {
+ SetWindowText(hwndDlg, "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)
+ {
+ GetDlgItemText(hwndDlg,IDC_NICKNAME,password,sizeof(password));
+ EndDialog(hwndDlg,TRUE);
+ return TRUE;
+ }
+ else if(LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hwndDlg,FALSE);
+ return FALSE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+BOOL ShowPwdDlg(char* pw) {
+ //kein gültiges ziel für das eingegebene passwort
+ if(&pw==NULL)
+ return FALSE;
+
+ if(DialogBox(hinstance,MAKEINTRESOURCE(IDD_SETNICKNAME),NULL,DlgPwProc))
+ {
+ //passwort kopieren
+ if(*password == 0)
+ return FALSE;
+
+ strcpy_s(pw,255,password);
+ return TRUE;
+ }
+
+ return FALSE;
+} \ No newline at end of file