a99  V32.6
allegro Windows Hauptprogramm
 Alle Klassen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
getp.cpp
gehe zur Dokumentation dieser Datei
1 // getp.cpp: Implementierungsdatei
2 // Passwort-Dialog
3 // Return: string name=passwort (unverschluesselt)
4 // Copyright 2011 Universitätsbibliothek Braunschweig, more see bottom
5 
6 #include "stdafx.h"
7 #include "ca99.h"
8 #include "a99.h"
9 #include "getp.h"
10 
11 #ifdef _DEBUG
12 #define new DEBUG_NEW
13 #undef THIS_FILE
14 static char THIS_FILE[] = __FILE__;
15 #endif
16 
17 /////////////////////////////////////////////////////////////////////////////
18 // Dialogfeld GetP
19 
20 
21 GetP::GetP(CWnd* pParent /*=NULL*/)
22  : CDialog(GetP::IDD, pParent)
23 {
24  m_aView=pParent;
25  //{{AFX_DATA_INIT(GetP)
26  //}}AFX_DATA_INIT
27 }
28 
29 
30 void GetP::DoDataExchange(CDataExchange* pDX)
31 {
33  //{{AFX_DATA_MAP(GetP)
34  DDX_Control(pDX, IDC_USER, m_getl);
35  DDX_Control(pDX, IDC_PSWD, m_pswd);
36  DDX_Control(pDX, IDC_PRMPT, m_prompt);
37  //}}AFX_DATA_MAP
38 }
39 
40 
41 BEGIN_MESSAGE_MAP(GetP, CDialog)
42  //{{AFX_MSG_MAP(GetP)
43 
44  //}}AFX_MSG_MAP
45 END_MESSAGE_MAP()
46 
47 /////////////////////////////////////////////////////////////////////////////
48 
49 int GetP::Ask(char *ask)
50 { // leider umstaendlich, aber sonst kommt ask nicht rueber!
51  extern a99 *dlg;
52  strcpy(aSK,ask);
53 
54  return CDialog::DoModal();
55 }
56 
58 {
59  return CDialog::DoModal();
60 }
61 
62 void GetP::OnOK()
63 {
64  extern char inpu[];
65  m_getl.GetWindowText(inpu,100); // input -> inpu
66  strcat(inpu,"=");
67  m_pswd.GetWindowText(inpu+strlen(inpu),100); // for OnCopy
68  CDialog::OnOK();
69 }
70 
72 {
73  m_getl.SetWindowText("");
74  extern int answ;
75  answ=IDCANCEL;
76  OnOK();
77 }
78 
80 {
82  MoveWindow(250,300,450,124);
83 
84  m_prompt.SetWindowText(aSK);
85 
86  return TRUE;
87 }
88 
89 
90 /*
91  Copyright 2011 Universitätsbibliothek Braunschweig
92 
93  Licensed under the Apache License, Version 2.0 (the "License");
94  you may not use this file except in compliance with the License.
95  You may obtain a copy of the License at
96 
97  http://www.apache.org/licenses/LICENSE-2.0
98 
99  Unless required by applicable law or agreed to in writing, software
100  distributed under the License is distributed on an "AS IS" BASIS,
101  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102  See the License for the specific language governing permissions and
103  limitations under the License.
104 */
105