riched20: modify ME_CharFromPoint to work properly with password
controls
Matt Finnicum
mattfinn at gmail.com
Mon Aug 7 08:26:30 CDT 2006
Hi,
This patch modifies ME_CharFromPoint to work properly with password
controls (the patch i sent in / got committed a couple days ago).
--Matthew Finnicum
-------------- next part --------------
From f69550cc89bb42b6b58d396e205946d387043218 Mon Sep 17 00:00:00 2001
From: Matthew Finnicum <MattFinn at gmail.com>
Date: Mon, 7 Aug 2006 09:11:32 -0400
Subject: [PATCH] riched20: modify ME_CharFromPoint to work properly with password controls
---
dlls/riched20/run.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
index d74d68f..5f74852 100644
--- a/dlls/riched20/run.c
+++ b/dlls/riched20/run.c
@@ -512,8 +512,19 @@ int ME_CharFromPoint(ME_TextEditor *edit
}
hDC = GetDC(editor->hWnd);
hOldFont = ME_SelectStyleFont(editor, hDC, run->style);
- GetTextExtentExPointW(hDC, run->strText->szData, run->strText->nLen,
- cx, &fit, NULL, &sz);
+
+ if (editor->cPasswordMask)
+ {
+ ME_String *strMasked = ME_MakeStringR(editor->cPasswordMask,ME_StrVLen(run->strText));
+ GetTextExtentExPointW(hDC, strMasked->szData, run->strText->nLen,
+ cx, &fit, NULL, &sz);
+ }
+ else
+ {
+ GetTextExtentExPointW(hDC, run->strText->szData, run->strText->nLen,
+ cx, &fit, NULL, &sz);
+ }
+
ME_UnselectStyleFont(editor, hDC, run->style, hOldFont);
ReleaseDC(editor->hWnd, hDC);
return fit;
--
1.4.1.1
More information about the wine-patches
mailing list