4 * This module is a simple wrapper for the RichEdit 2.0 control
6 * Copyright 2000 by Jean-Claude Batista
7 * Copyright 2005 Mike McCormack
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(richedit);
39 /* Window procedure of the RichEdit 1.0 control in riched20.dll */
40 extern LRESULT WINAPI RichEdit10ANSIWndProc(HWND, UINT, WPARAM, LPARAM);
43 /* Unregisters the window class. */
44 static BOOL RICHED32_Unregister(void)
48 UnregisterClassA(RICHEDIT_CLASS10A, NULL);
53 /* Registers the window class. */
54 static BOOL RICHED32_Register(void)
58 ZeroMemory(&wndClass, sizeof(WNDCLASSA));
59 wndClass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
60 wndClass.lpfnWndProc = RichEdit10ANSIWndProc;
61 wndClass.cbClsExtra = 0;
62 wndClass.cbWndExtra = 4;
63 wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
64 wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
65 wndClass.lpszClassName = RICHEDIT_CLASS10A; /* WC_RICHED32A; */
67 RegisterClassA(&wndClass);
72 /* Initialization function */
73 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
78 case DLL_PROCESS_ATTACH:
79 DisableThreadLibraryCalls(hinstDLL);
80 return RICHED32_Register();
82 case DLL_PROCESS_DETACH:
83 return RICHED32_Unregister();
88 /***********************************************************************
89 * DllGetVersion [RICHED32.2]
91 * Retrieves version information
93 HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
97 if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
100 pdvi->dwMajorVersion = 4;
101 pdvi->dwMinorVersion = 0;
102 pdvi->dwBuildNumber = 0;
103 pdvi->dwPlatformID = 0;