00025 {
00026
PWND pwnd;
00027
UINT cBorders;
00028
PCLS pclsT;
00029
00030
if (pwi->cbSize !=
sizeof(WINDOWINFO)) {
00031 RIPERR1(ERROR_INVALID_PARAMETER, RIP_WARNING,
"WINDOWINFO.cbSize %d is wrong", pwi->cbSize);
00032 }
00033
00034
00035
00036 pwnd =
ValidateHwnd(hwnd);
00037
00038
if (pwnd ==
NULL) {
00039
return FALSE;
00040 }
00041
00042
try {
00043
00044 pwi->rcWindow = pwnd->
rcWindow;
00045
00046
00047 pwi->rcClient = pwnd->
rcClient;
00048
00049
00050 pwi->dwStyle = pwnd->style;
00051 pwi->dwExStyle = pwnd->ExStyle;
00052 pwi->dwWindowStatus = 0;
00053
if (
TestWF(pwnd, WFFRAMEON))
00054 pwi->dwWindowStatus |= WS_ACTIVECAPTION;
00055
00056
00057 cBorders =
GetWindowBorders(pwnd->style, pwnd->ExStyle, TRUE, FALSE);
00058 pwi->cxWindowBorders = cBorders *
SYSMET(CXBORDER);
00059 pwi->cyWindowBorders = cBorders *
SYSMET(CYBORDER);
00060
00061
00062 pclsT = (
PCLS)
REBASEALWAYS(pwnd, pcls);
00063 pwi->atomWindowType = pclsT->
atomClassName;
00064
00065
00066
if (
TestWF(pwnd, WFWIN50COMPAT)) {
00067 pwi->wCreatorVersion =
VER50;
00068 }
else if (
TestWF(pwnd, WFWIN40COMPAT)) {
00069 pwi->wCreatorVersion =
VER40;
00070 }
else if (
TestWF(pwnd, WFWIN31COMPAT)) {
00071 pwi->wCreatorVersion =
VER31;
00072 }
else {
00073 pwi->wCreatorVersion =
VER30;
00074 }
00075 } except (W32ExceptionHandler(FALSE, RIP_WARNING)) {
00076 RIPERR1(ERROR_INVALID_WINDOW_HANDLE,
00077 RIP_WARNING,
00078
"Window %x no longer valid",
00079 hwnd);
00080
return FALSE;
00081 }
00082
00083
return TRUE;
00084 }