Windows2003-3790/inetsrv/pop3/admin/snapin/newdomaindlg.cpp
2020-09-30 16:53:55 +02:00

42 lines
1.1 KiB
C++

//////////////////////////////////////////////////////////////
//
// NewDomainDlg.cpp
//
// Implementation of the "Add Domain" dialog
//
//////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "NewDomainDlg.h"
LRESULT CNewDomainDlg::OnInitDialog( UINT mMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled )
{
Prefix_EnableWindow( m_hWnd, IDOK, FALSE );
SendDlgItemMessage( IDC_DOMAIN_NAME, EM_LIMITTEXT, 255, 0 );
HWND hWndDomain = GetDlgItem(IDC_DOMAIN_NAME);
if( hWndDomain && ::IsWindow(hWndDomain) )
{
m_wndDomainName.SubclassWindow( hWndDomain );
}
return 0;
}
LRESULT CNewDomainDlg::OnEditChange( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
{
// Check for Domain Name length
int nLen = SendDlgItemMessage( IDC_DOMAIN_NAME, WM_GETTEXTLENGTH );
Prefix_EnableWindow( m_hWnd, IDOK, (nLen > 0) );
return 0;
}
LRESULT CNewDomainDlg::OnClose( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled )
{
StrGetEditText( m_hWnd, IDC_DOMAIN_NAME, m_strName );
EndDialog(wID);
return 0;
}