29 #include "../../idlib/precompiled.h"
32 #include "../../sys/win32/rc/AFEditor_resource.h"
66 CDialog::DoDataExchange(pDX);
106 CDialog::OnInitDialog();
110 edit->GetWindowText( str );
111 edit->SetSel( 0, str.GetLength() );
122 CString strIn, strOut;
124 static bool entered =
false;
131 edit->GetSel( start, end );
132 edit->GetWindowText( strIn );
133 for (
int i = 0;
i < strIn.GetLength();
i++ ) {
134 if ( ( strIn[
i] >=
'a' && strIn[
i] <=
'z' ) ||
135 ( strIn[
i] >=
'A' && strIn[
i] <=
'Z' ) ||
136 ( strIn[
i] ==
'_' ) || ( strIn[
i] >=
'0' && strIn[
i] <=
'9' ) ) {
137 strOut.AppendChar( strIn[
i] );
140 edit->SetWindowText( strOut );
141 edit->SetSel( start, end );
148 ON_BN_CLICKED(IDOK, OnBnClickedOk)
158 if ( m_combo && m_combo->FindStringExact( -1, m_editName ) != -1 ) {
159 MessageBox(
va(
"The name %s is already used.", m_editName.GetBuffer() ),
"Name", MB_OK );
void GetName(CString &str)
void SetComboBox(CComboBox *combo)
virtual BOOL OnInitDialog()
void EditVerifyName(CEdit *edit)
void SetName(CString &str)
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void OnEnChangeEditAfName()
char * va(const char *fmt,...)