]>
git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSWindows/DNSServiceBrowser/Windows/Sources/Application.cpp
1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
22 #include "DNSServices.h"
24 #include "Application.h"
26 #include "ChooserDialog.h"
33 static char THIS_FILE
[] = __FILE__
;
36 //===========================================================================================================================
38 //===========================================================================================================================
40 BEGIN_MESSAGE_MAP(Application
, CWinApp
)
41 //{{AFX_MSG_MAP(Application)
42 // NOTE - the ClassWizard will add and remove mapping macros here.
43 // DO NOT EDIT what you see in these blocks of generated code!
45 ON_COMMAND(ID_HELP
, CWinApp::OnHelp
)
48 //===========================================================================================================================
50 //===========================================================================================================================
54 //===========================================================================================================================
56 //===========================================================================================================================
58 Application::Application( void )
63 //===========================================================================================================================
65 //===========================================================================================================================
67 BOOL
Application::InitInstance()
71 // Standard MFC initialization.
73 #if( !defined( AFX_DEPRECATED ) )
75 Enable3dControls(); // Call this when using MFC in a shared DLL
77 Enable3dControlsStatic(); // Call this when linking to MFC statically
83 // Set up DNS Services.
85 err
= DNSServicesInitialize( 0, 512 );
86 assert( err
== kDNSNoErr
);
88 // Create the chooser dialog.
90 ChooserDialog
* dialog
;
93 dialog
= new ChooserDialog
;
94 dialog
->Create( IDD_CHOOSER_DIALOG
);
96 dialog
->ShowWindow( SW_SHOW
);
101 //===========================================================================================================================
103 //===========================================================================================================================
105 int Application::ExitInstance( void )
107 // Clean up DNS Services.
109 DNSServicesFinalize();