Module: wine Branch: master Commit: a0ae811ecc06bfd9f6c1c8c338c1ee91816ad636 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0ae811ecc06bfd9f6c1c8c338...
Author: Juan Lang juan.lang@gmail.com Date: Thu Dec 18 14:05:17 2008 -0800
cryptui: Show/hide add purpose OID's scrollbar depending on how much text it has.
---
dlls/cryptui/main.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index e26bf55..7bd835f 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -1612,6 +1612,18 @@ static LRESULT CALLBACK add_purpose_dlg_proc(HWND hwnd, UINT msg, case WM_COMMAND: switch (HIWORD(wp)) { + case EN_CHANGE: + if (LOWORD(wp) == IDC_NEW_PURPOSE) + { + /* Show/hide scroll bar on description depending on how much + * text it has. + */ + HWND description = GetDlgItem(hwnd, IDC_NEW_PURPOSE); + int lines = SendMessageW(description, EM_GETLINECOUNT, 0, 0); + + ShowScrollBar(description, SB_VERT, lines > 1); + } + break; case BN_CLICKED: switch (LOWORD(wp)) {