Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ccb4b9cc
Commit
ccb4b9cc
authored
Feb 19, 2003
by
Duane Clark
Committed by
Alexandre Julliard
Feb 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix to get edit control scrolls bars to draw in the correct
position.
parent
9f5f86e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
10 deletions
+34
-10
richedit.c
dlls/richedit/richedit.c
+34
-10
No files found.
dlls/richedit/richedit.c
View file @
ccb4b9cc
...
...
@@ -118,8 +118,13 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
switch
(
uMsg
)
{
case
WM_CREATE
:
DPRINTF_EDIT_MSG32
(
"WM_CREATE"
);
case
WM_CREATE
:
DPRINTF_EDIT_MSG32
(
"WM_CREATE Passed to default"
);
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
return
0
;
case
WM_NCCREATE
:
DPRINTF_EDIT_MSG32
(
"WM_NCCREATE"
);
/* remove SCROLLBARS from the current window style */
hwndParent
=
((
LPCREATESTRUCTA
)
lParam
)
->
hwndParent
;
...
...
@@ -129,6 +134,7 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
newstyle
&=
~
WS_VSCROLL
;
newstyle
&=
~
ES_AUTOHSCROLL
;
newstyle
&=
~
ES_AUTOVSCROLL
;
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
newstyle
);
TRACE
(
"previous hwndEdit: %p
\n
"
,
hwndEdit
);
hwndEdit
=
CreateWindowA
(
"edit"
,
((
LPCREATESTRUCTA
)
lParam
)
->
lpszName
,
...
...
@@ -137,8 +143,10 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
((
LPCREATESTRUCTA
)
lParam
)
->
hInstance
,
NULL
)
;
TRACE
(
"hwndEdit: %p hwnd: %p
\n
"
,
hwndEdit
,
hwnd
);
SetWindowLongA
(
hwnd
,
GWL_STYLE
,
newstyle
);
return
0
;
if
(
hwndEdit
)
return
TRUE
;
else
return
FALSE
;
case
WM_SETFOCUS
:
DPRINTF_EDIT_MSG32
(
"WM_SETFOCUS"
);
...
...
@@ -612,9 +620,6 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
case
WM_STYLECHANGED
:
DPRINTF_EDIT_MSG32
(
"WM_STYLECHANGED Passed to edit control"
);
return
SendMessageA
(
hwndEdit
,
uMsg
,
wParam
,
lParam
);
case
WM_NCCALCSIZE
:
DPRINTF_EDIT_MSG32
(
"WM_NCCALCSIZE Passed to edit control"
);
return
SendMessageA
(
hwndEdit
,
uMsg
,
wParam
,
lParam
);
case
WM_GETTEXT
:
DPRINTF_EDIT_MSG32
(
"WM_GETTEXT Passed to edit control"
);
return
SendMessageA
(
hwndEdit
,
uMsg
,
wParam
,
lParam
);
...
...
@@ -635,6 +640,28 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
return
SendMessageA
(
hwndEdit
,
uMsg
,
wParam
,
lParam
);
/* Messages passed to default handler. */
case
WM_NCCALCSIZE
:
/* A fundamental problem with embedding an edit control within another
window to emulate the richedit control, is that normally, the
WM_NCCALCSIZE message window would return the client area of the
edit control.
While we could send a message to the edit control here to get that size
and return that value, this causes problems with the WM_SIZE message.
That is because the WM_SIZE message uses the returned value of
WM_NCCALCSIZE (via X11DRV_SetWindowSize) to determine the size to make
the edit control. If we return the size of the edit control client area
here, the result is the symptom of the edit control being inset on the
right and bottom by the width of any existing scrollbars.
The easy fix is to have WM_NCCALCSIZE return the true size of this
enclosing window, which is what we have done here. The more difficult
fix is to create a custom Richedit MoveWindow procedure for use in the
WM_SIZE message above. Since it is very unlikely that an app would call
and use the WM_NCCALCSIZE message, we stick with the easy fix for now.
*/
DPRINTF_EDIT_MSG32
(
"WM_NCCALCSIZE Passed to default"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
case
WM_NCPAINT
:
DPRINTF_EDIT_MSG32
(
"WM_NCPAINT Passed to default"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
...
...
@@ -675,9 +702,6 @@ static LRESULT WINAPI RICHED32_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
case
WM_SHOWWINDOW
:
DPRINTF_EDIT_MSG32
(
"WM_SHOWWINDOW Passed to default"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
case
WM_NCCREATE
:
DPRINTF_EDIT_MSG32
(
"WM_NCCREATE Passed to default"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
case
WM_PARENTNOTIFY
:
DPRINTF_EDIT_MSG32
(
"WM_PARENTNOTIFY Passed to default"
);
return
DefWindowProcA
(
hwnd
,
uMsg
,
wParam
,
lParam
);
...
...
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