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
077ec0cf
Commit
077ec0cf
authored
Nov 10, 1999
by
Rein Klazes
Committed by
Alexandre Julliard
Nov 10, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send WM_CTLCOLOREDIT not WM_CTLCOLORSTATIC messages to parent of a
disabled edit control if the application expects a windows version before WIN95 and NT40.
parent
0ea089b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
2 deletions
+32
-2
edit.c
controls/edit.c
+5
-2
winversion.h
include/winversion.h
+1
-0
version.c
misc/version.c
+26
-0
No files found.
controls/edit.c
View file @
077ec0cf
...
...
@@ -23,6 +23,7 @@
#include "debugtools.h"
#include "callback.h"
#include "tweak.h"
#include "winversion.h"
DECLARE_DEBUG_CHANNEL
(
combo
)
DECLARE_DEBUG_CHANNEL
(
edit
)
...
...
@@ -3103,7 +3104,8 @@ static LRESULT EDIT_WM_EraseBkGnd(WND *wnd, EDITSTATE *es, HDC dc)
HBRUSH
brush
;
RECT
rc
;
if
(
!
es
->
bEnableState
||
(
es
->
style
&
ES_READONLY
))
if
(
VERSION_AppWinVer
()
>=
0x40000
&&
(
!
es
->
bEnableState
||
(
es
->
style
&
ES_READONLY
)))
brush
=
(
HBRUSH
)
EDIT_SEND_CTLCOLORSTATIC
(
wnd
,
dc
);
else
brush
=
(
HBRUSH
)
EDIT_SEND_CTLCOLOR
(
wnd
,
dc
);
...
...
@@ -3710,7 +3712,8 @@ static void EDIT_WM_Paint(WND *wnd, EDITSTATE *es, WPARAM wParam)
}
if
(
es
->
font
)
old_font
=
SelectObject
(
dc
,
es
->
font
);
if
(
!
es
->
bEnableState
||
(
es
->
style
&
ES_READONLY
))
if
(
VERSION_AppWinVer
()
>=
0x40000
&&
(
!
es
->
bEnableState
||
(
es
->
style
&
ES_READONLY
)))
EDIT_SEND_CTLCOLORSTATIC
(
wnd
,
dc
);
else
EDIT_SEND_CTLCOLOR
(
wnd
,
dc
);
...
...
include/winversion.h
View file @
077ec0cf
...
...
@@ -16,5 +16,6 @@ typedef enum
extern
WINDOWS_VERSION
VERSION_GetVersion
(
void
);
extern
char
*
VERSION_GetVersionName
(
void
);
extern
BOOL
VERSION_OsIsUnicode
(
void
);
extern
DWORD
VERSION_AppWinVer
(
void
);
#endif
/* __WINE_WINVERSION_H */
misc/version.c
View file @
077ec0cf
...
...
@@ -317,6 +317,32 @@ WINDOWS_VERSION VERSION_GetVersion(void)
return
pdb
->
winver
;
}
/**********************************************************************
* VERSION_AppWinVer
* Returns the window version in case Wine emulates a later version
* of windows then the application expects.
*
* In a number of cases when windows runs an application that was
* designed for an earlier windows version, windows reverts
* to "old" behaviour of that earlier version.
*
* An example is a disabled edit control that needs to be painted.
* Old style behaviour is to send a WM_CTLCOLOREDIT message. This was
* changed in Win95, NT4.0 by a WM_CTLCOLORSTATIC message _only_ for
* applications with an expected version 0f 4.0 or higher.
*
*/
DWORD
VERSION_AppWinVer
(
void
)
{
WINDOWS_VERSION
ver
=
VERSION_GetVersion
();
DWORD
dwEmulatedVersion
=
MAKELONG
(
VersionData
[
ver
].
getVersionEx
.
dwMinorVersion
,
VersionData
[
ver
].
getVersionEx
.
dwMajorVersion
);
/* fixme: this may not be 100% correct; see discussion on the
* wine developer list in Nov 1999 */
DWORD
dwProcVersion
=
GetProcessVersion
(
0
);
return
dwProcVersion
<
dwEmulatedVersion
?
dwProcVersion
:
dwEmulatedVersion
;
}
/**********************************************************************
* VERSION_GetVersionName
...
...
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