Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dwMask with dwEffects in TJvTextAttributes.ConsistentAttributes #99

Conversation

Projects
None yet
2 participants
@MHumm
Copy link
Contributor

commented Apr 27, 2019

This implements the suggested fix for Mantis issue 6611
http://issuetracker.delphi-jedi.org/view.php?id=6611

mhumm
Replace dwMask with dwEffects for fixing Mantis issue 6611 Incorrect …
…result in TJvTextAttributes.ConsistentAttributes
@obones
Copy link
Member

left a comment

I disagree with this change, the documentation says this:

The dwMask member specifies which attributes are consistent throughout the entire selection

So clearly, a "GetConsistent" method should use the dwMask member.

See here:
https://docs.microsoft.com/en-us/windows/desktop/controls/em-getcharformat

@@ -6714,41 +6714,41 @@ function TJvTextAttributes.GetConsistentAttributes: TJvConsistentAttributes;
AttrFlags[FType], LParam(@Format));
with Format do
begin
if (dwMask and CFM_BOLD) <> 0 then
if (dwEffects and CFM_BOLD) <> 0 then

This comment has been minimized.

Copy link
@obones

obones Apr 30, 2019

Member

I disagree with this change, the documentation says this:

The dwMask member specifies which attributes are consistent throughout the entire selection

So clearly, a "GetConsistent" method should use the dwMask member.

See here:
https://docs.microsoft.com/en-us/windows/desktop/controls/em-getcharformat

@MHumm

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

After reading the MSDN docs myself I agree with obones and thus revoke this pull request.

@MHumm MHumm closed this Apr 30, 2019

@MHumm MHumm deleted the MHumm:Mantis6611_TJvTextAttributes.ConsistentAttributes_Result branch Apr 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.