summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-08-21 15:23:54 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-08-21 15:23:54 +0000
commit260cf26dec30e33ae3c7c6a91fccc0b4b43b8ce4 (patch)
treed2718f2979852832740f5eb1854e6e9b6d5dc7ed /plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
parent3abc8a4dcba551b8a3a01fcc1b7c311dff5eaf32 (diff)
latest XFire plugin sources by dufte (thanks)
No adaptions, uploaded as-is git-svn-id: http://svn.miranda-ng.org/main/trunk@1514 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp')
-rw-r--r--plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp b/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
new file mode 100644
index 0000000000..7b2202c24f
--- /dev/null
+++ b/plugins/!NotAdopted/Xfire/xfiretest/passworddialog.cpp
@@ -0,0 +1,59 @@
+//fürs passwort dialog - dufte
+
+#include "stdafx.h"
+#include "passworddialog.h"
+
+static char nick[255];
+BOOL usenick=FALSE;
+
+BOOL CALLBACK DlgPWProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ static char* pw[255];
+ switch (msg)
+ {
+ case WM_CLOSE:
+ {
+ GetDlgItemTextA(hwndDlg,IDC_PWSTRING,(LPSTR)pw,254);
+ if(usenick)
+ GetDlgItemTextA(hwndDlg,IDC_PWNICK,(LPSTR)nick,254);
+ EndDialog(hwndDlg,(INT_PTR)pw);
+ break;
+ }
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwndDlg);
+ //passwort und nick leeren
+ pw[0]=0;
+ nick[0]=0;
+ SendMessage(hwndDlg,WM_SETICON, (WPARAM)false, (LPARAM)LoadIcon(hinstance, MAKEINTRESOURCE(IDI_TM)));
+ if(!usenick)
+ EnableWindow(GetDlgItem(hwndDlg,IDC_PWNICK),FALSE);
+
+ return TRUE;
+ }
+ case WM_COMMAND:
+ {
+ if(LOWORD(wParam) == IDC_BTN4) {
+ SendMessage(hwndDlg,WM_CLOSE,0,0);
+ }
+ break;
+ }
+ }
+ return FALSE;
+}
+
+void ShowPasswordDialog(char*pw,char*mynick) {
+ if(mynick!=NULL)
+ {
+ usenick=TRUE;
+ }
+ else
+ usenick=FALSE;
+
+ char* npw = (char*)DialogBox(hinstance,MAKEINTRESOURCE(IDD_PWDLG),NULL,DlgPWProc);
+ strcpy(pw,npw);
+ if(mynick)
+ {
+ strcpy(mynick,(char*)nick);
+ }
+} \ No newline at end of file