Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2a1a0cf2
Commit
2a1a0cf2
authored
Dec 05, 2005
by
Cihan Altinay
Committed by
Alexandre Julliard
Dec 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: register ListBox & ComboBox classes
Partially implement REExtendedRegisterClass() to register missing window classes so that applications relying on them don't get confused.
parent
38dbf09d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
2 deletions
+63
-2
editor.c
dlls/riched20/editor.c
+63
-2
No files found.
dlls/riched20/editor.c
View file @
2a1a0cf2
...
...
@@ -2,6 +2,7 @@
* RichEdit - functions dealing with editor object
*
* Copyright 2004 by Krzysztof Foltman
* Copyright 2005 by Cihan Altinay
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -208,6 +209,7 @@
* - full justification
* - hyphenation
* - tables
* - ListBox & ComboBox not implemented
*
* Bugs that are probably fixed, but not so easy to verify:
* - EN_UPDATE/EN_CHANGE are handled very incorrectly (should be OK now)
...
...
@@ -235,6 +237,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit);
int
me_debug
=
0
;
HANDLE
me_heap
=
NULL
;
static
BOOL
ME_ListBoxRegistered
=
FALSE
;
static
BOOL
ME_ComboBoxRegistered
=
FALSE
;
static
ME_TextBuffer
*
ME_MakeText
(
void
)
{
ME_TextBuffer
*
buf
=
ALLOC_OBJ
(
ME_TextBuffer
);
...
...
@@ -934,6 +939,8 @@ void ME_DestroyEditor(ME_TextEditor *editor)
static
WCHAR
wszClassName
[]
=
{
'R'
,
'i'
,
'c'
,
'h'
,
'E'
,
'd'
,
'i'
,
't'
,
'2'
,
'0'
,
'W'
,
0
};
static
WCHAR
wszClassName50
[]
=
{
'R'
,
'i'
,
'c'
,
'h'
,
'E'
,
'd'
,
'i'
,
't'
,
'5'
,
'0'
,
'W'
,
0
};
static
WCHAR
wszClassNameListBox
[]
=
{
'R'
,
'E'
,
'L'
,
'i'
,
's'
,
't'
,
'B'
,
'o'
,
'x'
,
'2'
,
'0'
,
'W'
,
0
};
static
WCHAR
wszClassNameComboBox
[]
=
{
'R'
,
'E'
,
'C'
,
'o'
,
'm'
,
'b'
,
'o'
,
'B'
,
'o'
,
'x'
,
'2'
,
'0'
,
'W'
,
0
};
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
...
...
@@ -951,6 +958,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
UnregisterClassW
(
wszClassName50
,
0
);
UnregisterClassA
(
"RichEdit20A"
,
0
);
UnregisterClassA
(
"RichEdit50A"
,
0
);
if
(
ME_ListBoxRegistered
)
UnregisterClassW
(
wszClassNameListBox
,
0
);
if
(
ME_ComboBoxRegistered
)
UnregisterClassW
(
wszClassNameComboBox
,
0
);
HeapDestroy
(
me_heap
);
me_heap
=
NULL
;
break
;
...
...
@@ -2167,12 +2178,62 @@ HRESULT WINAPI CreateTextServices(IUnknown *punkOuter, void *pITextHost,
return
E_FAIL
;
/* E_NOTIMPL isn't allowed by MSDN */
}
LRESULT
WINAPI
REComboWndProc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
/* FIXME: Not implemented */
TRACE
(
"hWnd %p msg %04x (%s) %08x %08lx
\n
"
,
hWnd
,
msg
,
get_msg_name
(
msg
),
wParam
,
lParam
);
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
}
LRESULT
WINAPI
REListWndProc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
/* FIXME: Not implemented */
TRACE
(
"hWnd %p msg %04x (%s) %08x %08lx
\n
"
,
hWnd
,
msg
,
get_msg_name
(
msg
),
wParam
,
lParam
);
return
DefWindowProcW
(
hWnd
,
msg
,
wParam
,
lParam
);
}
/******************************************************************
* REExtendedRegisterClass (RICHED20.8)
*
* FIXME undocumented
* Need to check for errors and implement controls and callbacks
*/
void
WINAPI
REExtendedRegisterClass
(
void
)
LRESULT
WINAPI
REExtendedRegisterClass
(
void
)
{
FIXME
(
"stub
\n
"
);
WNDCLASSW
wcW
;
UINT
result
;
FIXME
(
"semi stub
\n
"
);
wcW
.
cbClsExtra
=
0
;
wcW
.
cbWndExtra
=
4
;
wcW
.
hInstance
=
NULL
;
wcW
.
hIcon
=
NULL
;
wcW
.
hCursor
=
NULL
;
wcW
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wcW
.
lpszMenuName
=
NULL
;
if
(
!
ME_ListBoxRegistered
)
{
wcW
.
style
=
CS_PARENTDC
|
CS_DBLCLKS
|
CS_GLOBALCLASS
;
wcW
.
lpfnWndProc
=
REListWndProc
;
wcW
.
lpszClassName
=
wszClassNameListBox
;
if
(
RegisterClassW
(
&
wcW
))
ME_ListBoxRegistered
=
TRUE
;
}
if
(
!
ME_ComboBoxRegistered
)
{
wcW
.
style
=
CS_PARENTDC
|
CS_DBLCLKS
|
CS_GLOBALCLASS
|
CS_VREDRAW
|
CS_HREDRAW
;
wcW
.
lpfnWndProc
=
REComboWndProc
;
wcW
.
lpszClassName
=
wszClassNameComboBox
;
if
(
RegisterClassW
(
&
wcW
))
ME_ComboBoxRegistered
=
TRUE
;
}
result
=
0
;
if
(
ME_ListBoxRegistered
)
result
+=
1
;
if
(
ME_ComboBoxRegistered
)
result
+=
2
;
return
result
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment