cryptui: Show/hide add purpose OID's scrollbar depending on how much text it has.

This commit is contained in:
Juan Lang 2008-12-18 14:05:17 -08:00 committed by Alexandre Julliard
parent 356596561c
commit a0ae811ecc
1 changed files with 12 additions and 0 deletions

View File

@ -1612,6 +1612,18 @@ static LRESULT CALLBACK add_purpose_dlg_proc(HWND hwnd, UINT msg,
case WM_COMMAND: case WM_COMMAND:
switch (HIWORD(wp)) 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: case BN_CLICKED:
switch (LOWORD(wp)) switch (LOWORD(wp))
{ {