Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrichedit.c
Go to the documentation of this file.
00001 /* 00002 * RichEdit32 functions 00003 * 00004 * This module is a simple wrapper for the RichEdit 2.0 control 00005 * 00006 * Copyright 2000 by Jean-Claude Batista 00007 * Copyright 2005 Mike McCormack 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00022 */ 00023 00024 #include <stdarg.h> 00025 #include <string.h> 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "wingdi.h" 00029 #include "winreg.h" 00030 #include "winerror.h" 00031 #include "winuser.h" 00032 #include "richedit.h" 00033 #include "shlwapi.h" 00034 00035 #include "wine/debug.h" 00036 00037 WINE_DEFAULT_DEBUG_CHANNEL(richedit); 00038 00039 /* Window procedure of the RichEdit 1.0 control in riched20.dll */ 00040 extern LRESULT WINAPI RichEdit10ANSIWndProc(HWND, UINT, WPARAM, LPARAM); 00041 00042 00043 /* Unregisters the window class. */ 00044 static BOOL RICHED32_Unregister(void) 00045 { 00046 TRACE("\n"); 00047 00048 UnregisterClassA(RICHEDIT_CLASS10A, NULL); 00049 return TRUE; 00050 } 00051 00052 00053 /* Registers the window class. */ 00054 static BOOL RICHED32_Register(void) 00055 { 00056 WNDCLASSA wndClass; 00057 00058 ZeroMemory(&wndClass, sizeof(WNDCLASSA)); 00059 wndClass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS; 00060 wndClass.lpfnWndProc = RichEdit10ANSIWndProc; 00061 wndClass.cbClsExtra = 0; 00062 wndClass.cbWndExtra = sizeof(void *); 00063 wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); 00064 wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); 00065 wndClass.lpszClassName = RICHEDIT_CLASS10A; /* WC_RICHED32A; */ 00066 00067 RegisterClassA(&wndClass); 00068 00069 return TRUE; 00070 } 00071 00072 /* Initialization function */ 00073 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 00074 { 00075 TRACE("\n"); 00076 switch (fdwReason) 00077 { 00078 case DLL_PROCESS_ATTACH: 00079 DisableThreadLibraryCalls(hinstDLL); 00080 return RICHED32_Register(); 00081 00082 case DLL_PROCESS_DETACH: 00083 return RICHED32_Unregister(); 00084 } 00085 return TRUE; 00086 } 00087 00088 /*********************************************************************** 00089 * DllGetVersion [RICHED32.2] 00090 * 00091 * Retrieves version information 00092 */ 00093 HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi) 00094 { 00095 TRACE("\n"); 00096 00097 if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) 00098 return E_INVALIDARG; 00099 00100 pdvi->dwMajorVersion = 4; 00101 pdvi->dwMinorVersion = 0; 00102 pdvi->dwBuildNumber = 0; 00103 pdvi->dwPlatformID = 0; 00104 00105 return S_OK; 00106 } Generated on Mon May 28 2012 04:17:23 for ReactOS by
1.7.6.1
|