mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
- improved control resizing handling
- don't fail when querying the account name length svn path=/trunk/; revision=18173
This commit is contained in:
parent
39d1d2d86c
commit
2357be7820
2 changed files with 187 additions and 184 deletions
|
@ -115,7 +115,8 @@ AddPrincipalToList(IN PSECURITY_PAGE sp,
|
|||
&SidNameUse))
|
||||
{
|
||||
LookupResult = GetLastError();
|
||||
if (LookupResult != ERROR_NONE_MAPPED)
|
||||
if (LookupResult != ERROR_NONE_MAPPED &&
|
||||
LookupResult != ERROR_INSUFFICIENT_BUFFER)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -375,7 +376,9 @@ AddPrincipalListEntry(IN PSECURITY_PAGE sp,
|
|||
li.iSubItem = 0;
|
||||
li.state = (Selected ? LVIS_SELECTED : 0);
|
||||
li.stateMask = LVIS_SELECTED;
|
||||
li.pszText = (PrincipalListItem->DisplayString != NULL ? PrincipalListItem->DisplayString : PrincipalListItem->AccountName);
|
||||
li.pszText = (PrincipalListItem->DisplayString != NULL ?
|
||||
PrincipalListItem->DisplayString :
|
||||
PrincipalListItem->AccountName);
|
||||
|
||||
switch (PrincipalListItem->SidNameUse)
|
||||
{
|
||||
|
@ -632,11 +635,8 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
nControls += 2;
|
||||
}
|
||||
|
||||
if (!(dwp = BeginDeferWindowPos(nControls)))
|
||||
if ((dwp = BeginDeferWindowPos(nControls)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* resize the Principal list view */
|
||||
GetWindowRect(sp->hWndPrincipalsList,
|
||||
&rcControl);
|
||||
|
@ -649,7 +649,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
rcControl.bottom - rcControl.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move the Add Principal button */
|
||||
|
@ -675,7 +675,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
SWP_NOSIZE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move the Delete Principal button */
|
||||
|
@ -694,7 +694,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
SWP_NOSIZE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move the Permissions For label */
|
||||
|
@ -721,7 +721,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
rcControl3.bottom - rcControl3.top,
|
||||
SWP_NOMOVE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move the Allow label */
|
||||
|
@ -742,7 +742,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
SWP_NOSIZE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move the Deny label */
|
||||
|
@ -761,7 +761,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
SWP_NOSIZE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* resize the Permissions check list box */
|
||||
|
@ -779,11 +779,12 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
cxWidth,
|
||||
((sp->ObjectInfo.dwFlags & SI_ADVANCED) ?
|
||||
Height - (rcControl.top - rcWnd.top) - (rcControl3.bottom - rcControl3.top) - pt.x - btnSpacing :
|
||||
Height - (rcControl.top - rcWnd.top) -
|
||||
(rcControl3.bottom - rcControl3.top) - pt.x - btnSpacing :
|
||||
Height - (rcControl.top - rcWnd.top) - pt.x),
|
||||
SWP_NOMOVE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
if (sp->ObjectInfo.dwFlags & SI_ADVANCED)
|
||||
|
@ -799,7 +800,7 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
rcControl3.bottom - rcControl3.top,
|
||||
SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
|
||||
/* move and resize the Advanced button */
|
||||
|
@ -812,12 +813,14 @@ ResizeControls(IN PSECURITY_PAGE sp,
|
|||
0,
|
||||
SWP_NOSIZE | SWP_NOZORDER)))
|
||||
{
|
||||
return;
|
||||
goto EndDeferWnds;
|
||||
}
|
||||
}
|
||||
|
||||
EndDeferWindowPos(dwp);
|
||||
}
|
||||
|
||||
EndDeferWnds:
|
||||
/* update the width of the principal list view column */
|
||||
GetClientRect(sp->hWndPrincipalsList,
|
||||
&rcControl);
|
||||
|
|
Loading…
Reference in a new issue