Source code of Windows XP (NT5)
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.
|
|
/*==========================================================================
* * Copyright (C) 1995-1999 Microsoft Corporation. All Rights Reserved. * * File: conndlg.cpp * Content: Connect Dialog Support Routines * History: * * Date By Reason * ==== == ====== * 10/15/99 rodtoll created it * ***************************************************************************/
#include "dxvhelppch.h"
TCHAR g_lpszAddress[_MAX_PATH] = _T("");
INT_PTR CALLBACK ConnectDialog_WinProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG:
_tcscpy( g_lpszAddress, _T("localhost") ); SetWindowText( GetDlgItem( hDlg, IDC_EDIT_ADDRESS), g_lpszAddress );
return TRUE;
case WM_COMMAND: if (LOWORD(wParam) == IDOK ) { GetWindowText( GetDlgItem( hDlg, IDC_EDIT_ADDRESS), g_lpszAddress, _MAX_PATH ); }
if( LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } return FALSE; }
BOOL GetConnectSettings( HINSTANCE hInst, HWND hOwner, LPTSTR lpszAddress ) { _tcscpy( g_lpszAddress, lpszAddress );
if( DialogBox( hInst, MAKEINTRESOURCE( IDD_DIALOG_CONNECT ), hOwner, ConnectDialog_WinProc ) == IDOK ) { _tcscpy( lpszAddress, g_lpszAddress ); return TRUE; } else { return FALSE; } }
|