You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
//////////////////////////////////////////////////////////////
|
|
//
|
|
// 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;
|
|
}
|