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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 /***********************************************************************
44 * DllGetVersion [RICHED32.2]
46 * Retrieves version information
48 HRESULT WINAPI
RICHED32_DllGetVersion (DLLVERSIONINFO
*pdvi
)
52 if (pdvi
->cbSize
!= sizeof(DLLVERSIONINFO
))
55 pdvi
->dwMajorVersion
= 4;
56 pdvi
->dwMinorVersion
= 0;
57 pdvi
->dwBuildNumber
= 0;
58 pdvi
->dwPlatformID
= 0;
63 /* Unregisters the window class. */
64 static BOOL
RICHED32_Unregister(void)
68 UnregisterClassA(RICHEDIT_CLASS10A
, NULL
);
73 /* Registers the window class. */
74 static BOOL
RICHED32_Register(void)
78 ZeroMemory(&wndClass
, sizeof(WNDCLASSA
));
79 wndClass
.style
= CS_HREDRAW
| CS_VREDRAW
| CS_GLOBALCLASS
;
80 wndClass
.lpfnWndProc
= RichEdit10ANSIWndProc
;
81 wndClass
.cbClsExtra
= 0;
82 wndClass
.cbWndExtra
= 4;
83 wndClass
.hCursor
= LoadCursorA(0, (LPSTR
)IDC_ARROW
);
84 wndClass
.hbrBackground
= (HBRUSH
)(COLOR_WINDOW
+ 1);
85 wndClass
.lpszClassName
= RICHEDIT_CLASS10A
; /* WC_RICHED32A; */
87 RegisterClassA(&wndClass
);
92 /* Initialization function */
93 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
98 case DLL_PROCESS_ATTACH
:
99 DisableThreadLibraryCalls(hinstDLL
);
100 return RICHED32_Register();
102 case DLL_PROCESS_DETACH
:
103 return RICHED32_Unregister();