00025 {
00026
int cxFrame, yTopOld;
00027 RECT rcTemp;
00028
PMENU pMenu;
00029
TL tlpmenu;
00030
int cBorders;
00031
BOOL fEmptyClient;
00032
BYTE bFramePresent;
00033
00034
CheckLock(pwnd);
00035 UserAssert(
IsWinEventNotifyDeferredOK());
00036
00037 bFramePresent =
TestWF(pwnd, WFFRAMEPRESENTMASK);
00038
00039
00040
00041
00042
00043
ClrWF(pwnd, WFFRAMEPRESENTMASK);
00044
00045
00046
00047
00048
00049
00050
ClrWF(pwnd, WFCEPRESENT);
00051
00052
00053
00054
00055
if (
TestWF(pwnd, WFMINIMIZED)) {
00056
00057
00058
00059
00060 lprc->right = lprc->left;
00061 lprc->bottom = lprc->top;
00062
goto CalcClientDone;
00063 }
00064
00065
00066
CopyRect(&rcTemp, lprc);
00067
00068
00069 yTopOld = rcTemp.top;
00070
00071
00072
if (
TestWF(pwnd, WFBORDERMASK) ==
LOBYTE(WFCAPTION))
00073 {
00074
SetWF(pwnd, WFCPRESENT);
00075
00076 rcTemp.top +=
GetCaptionHeight(pwnd);
00077 }
00078
00079
00080 cBorders =
GetWindowBorders(pwnd->style, pwnd->ExStyle, TRUE, FALSE);
00081 cxFrame = cBorders * SYSMETFROMPROCESS(CXBORDER);
00082
InflateRect(&rcTemp, -cxFrame, -cBorders * SYSMETFROMPROCESS(CYBORDER));
00083
00084
if (!
TestwndChild(pwnd) && (pMenu = pwnd->
spmenu)) {
00085
SetWF(pwnd, WFMPRESENT);
00086
if (!fHungRedraw) {
00087
ThreadLockAlways(pMenu, &tlpmenu);
00088 rcTemp.top +=
xxxMenuBarCompute(pMenu, pwnd, rcTemp.top - yTopOld,
00089 cxFrame, rcTemp.right - rcTemp.left);
00090
ThreadUnlock(&tlpmenu);
00091 }
00092 }
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107 fEmptyClient =
FALSE;
00108
00109
if (rcTemp.top >= rcTemp.bottom) {
00110 rcTemp.bottom = rcTemp.top;
00111 fEmptyClient =
TRUE;
00112 }
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
if (
TestWF(pwnd, WFWIN40COMPAT) && (rcTemp.left >= rcTemp.right)) {
00130 rcTemp.right = rcTemp.left;
00131 fEmptyClient =
TRUE;
00132 }
00133
00134
if (fEmptyClient)
00135
goto ClientCalcEnd;
00136
00137
00138
00139
00140
if (
TestWF(pwnd, WEFCLIENTEDGE) &&
00141 (rcTemp.right - rcTemp.left >= (2 * SYSMETFROMPROCESS(CXEDGE))) &&
00142 (rcTemp.bottom - rcTemp.top >= (2 * SYSMETFROMPROCESS(CYEDGE))) ) {
00143
SetWF(pwnd, WFCEPRESENT);
00144
InflateRect(&rcTemp, -SYSMETFROMPROCESS(CXEDGE), -SYSMETFROMPROCESS(CYEDGE));
00145 }
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
if (
TestWF(pwnd, WFHSCROLL) && (rcTemp.bottom - rcTemp.top > SYSMETFROMPROCESS(CYHSCROLL))) {
00156
SetWF(pwnd, WFHPRESENT);
00157
if (!fHungRedraw) {
00158 rcTemp.bottom -= SYSMETFROMPROCESS(CYHSCROLL);
00159 }
00160 }
00161
00162
if (
TestWF(pwnd, WFVSCROLL) && (rcTemp.right - rcTemp.left >= SYSMETFROMPROCESS(CXVSCROLL))) {
00163
SetWF(pwnd, WFVPRESENT);
00164
if (!fHungRedraw) {
00165
#ifdef USE_MIRRORING
00166
if ((!!
TestWF(pwnd, WEFLEFTSCROLL)) ^ (!!
TestWF(pwnd, WEFLAYOUTRTL)))
00167
#else
00168
if (
TestWF(pwnd, WEFLEFTSCROLL))
00169
#endif
00170
rcTemp.left += SYSMETFROMPROCESS(CXVSCROLL);
00171
else
00172 rcTemp.right -= SYSMETFROMPROCESS(CXVSCROLL);
00173 }
00174 }
00175
00176 ClientCalcEnd:
00177
00178
CopyRect(lprc, &rcTemp);
00179
00180 CalcClientDone:
00181
if (
FWINABLE() && (bFramePresent !=
TestWF(pwnd, WFFRAMEPRESENTMASK))) {
00182
xxxWindowEvent(EVENT_OBJECT_REORDER, pwnd, OBJID_WINDOW, 0, WEF_USEPWNDTHREAD);
00183 }
00184 }