Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygensettings.c
Go to the documentation of this file.
00001 /* 00002 * 3D Text OpenGL Screensaver (settings.c) 00003 * 00004 * Copyright 2007 Marc Piulachs 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00022 00023 #include "3dtext.h" 00024 00025 TCHAR m_Text[MAX_PATH] = _T("ReactOS Rocks!"); 00026 00027 VOID LoadSettings(VOID) 00028 { 00029 HKEY hkey; 00030 DWORD len = MAX_PATH * sizeof(TCHAR); 00031 00032 if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\ScreenSavers\\Text3D"), 0, 00033 _T(""), 0, KEY_READ, NULL, &hkey, NULL) == ERROR_SUCCESS) 00034 { 00035 RegQueryValueEx(hkey, _T("DisplayString"), NULL, NULL, (LPBYTE)m_Text, &len); 00036 RegCloseKey(hkey); 00037 } 00038 } 00039 00040 VOID SaveSettings(VOID) 00041 { 00042 HKEY hkey; 00043 00044 if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Software\\Microsoft\\ScreenSavers\\Text3D"), 0, 00045 _T(""), 0, KEY_WRITE, NULL, &hkey, NULL) == ERROR_SUCCESS) 00046 { 00047 RegSetValueEx(hkey, _T("DisplayString"), 0, REG_SZ, (LPBYTE)m_Text, (_tcslen(m_Text) + 1) * sizeof(TCHAR)); 00048 RegCloseKey(hkey); 00049 } 00050 } Generated on Fri May 25 2012 04:14:51 for ReactOS by
1.7.6.1
|