Commit a0ae811e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent 35659656
......@@ -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))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment