[Bug 51899] 16-bit Collins Dictionary has black background.

WineHQ Bugzilla wine-bugs at winehq.org
Sun Oct 24 16:20:44 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=51899

--- Comment #20 from Bruni <earns.61 at gmail.com> ---
(In reply to O. Nykyforchyn from comment #19)
> Created attachment 70885 [details]
> Screenshot of Collins Dictionary
> 
> I compiled Wine with the latter patch, and logs show that all handles pass
> through get_dc_attr() for EDTWIN.EXE. Is this the required goal or am I miss
> something?
> 
> Selected text is unreadable indeed.

BTW, Can EM_GETSEL be broken here by posting an incorrect selection position?
Can Wine just cut a 'hole' in the background, instead of applying a style for
selected text?

According to "Programming Windows" by Charles Petzold, sending an edit control
an EM_GETSEL message returns an integer containing this information:

LRESULT iSelect = SendMessage (hwndEdit, EM_GETSEL, 0, 0);

The low word of iSelect is the position of the first selected character; the
high word of iSelect is the position of the character following the selection.
If these two words are equal, no text has been selected.

Maybe, it's worthwhile to trace those positions inside the message loop for the
control like this?

LRESULT iSelect = SendMessage (hwndEdit, EM_GETSEL, 0, 0);
if (HIWORD(iSelect) != LOWORD(iSelect))
{
    TRACE("Start position of the selected text %x\n", LOWORD(iSelect));
    TRACE("End position of the selected text %x\n", HIWORD(iSelect));
}

I don't know how to insert these lines in dlls/user.exe16/message.c without
infinite recursion in SendMessage, though.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list