Module: wine Branch: master Commit: c489ce31ba45b2787dd9b0764a751d1a10a3f54e URL: http://source.winehq.org/git/wine.git/?a=commit;h=c489ce31ba45b2787dd9b0764a...
Author: Juan Lang juan.lang@gmail.com Date: Thu Dec 18 13:54:28 2008 -0800
cryptui: Show/hide description's scrollbar depending on how much text it has.
---
dlls/cryptui/main.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c index c38bf1a..820d0a5 100644 --- a/dlls/cryptui/main.c +++ b/dlls/cryptui/main.c @@ -1624,6 +1624,24 @@ static LRESULT CALLBACK cert_properties_general_dlg_proc(HWND hwnd, UINT msg, SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)data); break; } + case WM_COMMAND: + switch (HIWORD(wp)) + { + case EN_CHANGE: + SendMessageW(GetParent(hwnd), PSM_CHANGED, (WPARAM)hwnd, 0); + if (LOWORD(wp) == IDC_DESCRIPTION) + { + /* Show/hide scroll bar on description depending on how much + * text it has. + */ + HWND description = GetDlgItem(hwnd, IDC_DESCRIPTION); + int lines = SendMessageW(description, EM_GETLINECOUNT, 0, 0); + + ShowScrollBar(description, SB_VERT, lines > 1); + } + break; + } + break; } return 0; }