X-Git-Url: https://git.saurik.com/apple/mdnsresponder.git/blobdiff_plain/32bb7e43b766b4cf6c03ab11609bf9c164e40239..83fb1e36c79aee7f897e5ff0e6eeed1d9d526a14:/mDNSWindows/ControlPanel/FourthPage.cpp?ds=inline diff --git a/mDNSWindows/ControlPanel/FourthPage.cpp b/mDNSWindows/ControlPanel/FourthPage.cpp index c1f9849..b6c8d15 100755 --- a/mDNSWindows/ControlPanel/FourthPage.cpp +++ b/mDNSWindows/ControlPanel/FourthPage.cpp @@ -13,16 +13,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - - Change History (most recent first): - -$Log: FourthPage.cpp,v $ -Revision 1.1 2009/07/01 19:20:37 herscher - UI changes for configuring sleep proxy settings. - - - -*/ + */ #include "FourthPage.h" #include "resource.h" @@ -74,8 +65,10 @@ void CFourthPage::DoDataExchange(CDataExchange* pDX) BEGIN_MESSAGE_MAP(CFourthPage, CPropertyPage) //{{AFX_MSG_MAP(CFourthPage) - //}}AFX_MSG_MAP - ON_BN_CLICKED(IDC_POWER_MANAGEMENT, &CFourthPage::OnBnClickedPowerManagement) + //}}AFX_MSG_MAP + + ON_BN_CLICKED(IDC_POWER_MANAGEMENT, &CFourthPage::OnBnClickedPowerManagement) + END_MESSAGE_MAP() @@ -112,7 +105,8 @@ CFourthPage::OnSetActive() // Now populate the browse domain box - err = RegCreateKey( HKEY_LOCAL_MACHINE, kServiceParametersNode L"\\Power Management", &key ); + err = RegCreateKeyEx( HKEY_LOCAL_MACHINE, kServiceParametersNode L"\\Power Management", 0, + NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &key, NULL ); require_noerr( err, exit ); dwSize = sizeof( DWORD ); @@ -158,7 +152,8 @@ CFourthPage::Commit() DWORD enabled; DWORD err; - err = RegCreateKey( HKEY_LOCAL_MACHINE, kServiceParametersNode L"\\Power Management", &key ); + err = RegCreateKeyEx( HKEY_LOCAL_MACHINE, kServiceParametersNode L"\\Power Management", 0, + NULL, REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, NULL, &key, NULL ); require_noerr( err, exit ); enabled = m_checkBox.GetCheck(); @@ -178,14 +173,25 @@ exit: // CFourthPage::OnBnClickedRemoveBrowseDomain //--------------------------------------------------------------------------------------------------------------------------- - -void CFourthPage::OnBnClickedPowerManagement() -{ - char buf[ 256 ]; - - sprintf( buf, "check box: %d", m_checkBox.GetCheck() ); - OutputDebugStringA( buf ); - // TODO: Add your control notification handler code here - - SetModified( TRUE ); -} + + +void CFourthPage::OnBnClickedPowerManagement() + +{ + + char buf[ 256 ]; + + + + sprintf( buf, "check box: %d", m_checkBox.GetCheck() ); + + OutputDebugStringA( buf ); + + // TODO: Add your control notification handler code here + + + + SetModified( TRUE ); + +} +