// Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #include "stdafx.h" #include "resource.h" #include "GetVal.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // GetVal dialog //#define CARACTERES_INVALIDE "/\:*?"<>|" char CaracteresInvalides[]={47,92,58,'*','?',34,60,62,124,0}; GetVal::GetVal(CWnd* pParent /*=NULL*/) : CDialog(GetVal::IDD, pParent) { //{{AFX_DATA_INIT(GetVal) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void GetVal::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(GetVal) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(GetVal, CDialog) //{{AFX_MSG_MAP(GetVal) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // GetVal message handlers void GetVal::OnOK() { // TODO: Add extra validation here NameOk=1; CEdit *EditStr=(CEdit*)GetDlgItem(IDC_EDIT_ADD_TERRITOIRE); CString rString; EditStr->GetWindowText( rString ); int size = rString.GetLength(); name = new TCHAR[size+1]; _tcscpy(name, rString); /**((short*)name)=size; EditStr->GetLine(0,name,size); for (int i=0;iSetFocus(); ed->SetLimitText(100); } return CDialog::WindowProc(message, wParam, lParam); }