EC_USEFONTINFO means es->char_width/3, not es->char_width. This is

true for multiline controls too, as my tests show.
This commit is contained in:
Pavel Roskin 1999-04-01 11:56:41 +00:00 committed by Alexandre Julliard
parent 3025dc181b
commit dc75bd4038
1 changed files with 4 additions and 10 deletions

View File

@ -2654,8 +2654,8 @@ static void EDIT_EM_SetLimitText(WND *wnd, EDITSTATE *es, INT limit)
* EM_SETMARGINS
*
* EC_USEFONTINFO is used as a left or right value i.e. lParam and not as an
* action wParam despite what the docs say. It also appears not to affect
* multiline controls??
* action wParam despite what the docs say. EC_USEFONTINFO means one third
* of the char's width, according to the new docs.
*
*/
static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
@ -2665,20 +2665,14 @@ static void EDIT_EM_SetMargins(WND *wnd, EDITSTATE *es, INT action,
if (left != EC_USEFONTINFO)
es->left_margin = left;
else
if (es->style & ES_MULTILINE)
es->left_margin = 0; /* ?? */
else
es->left_margin = es->char_width;
es->left_margin = es->char_width / 3;
}
if (action & EC_RIGHTMARGIN) {
if (right != EC_USEFONTINFO)
es->right_margin = right;
else
if (es->style & ES_MULTILINE)
es->right_margin = 0; /* ?? */
else
es->right_margin = es->char_width;
es->right_margin = es->char_width / 3;
}
TRACE(edit, "left=%d, right=%d\n", es->left_margin, es->right_margin);
}