Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

winable.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

BOOL WINAPI GetWindowInfo (HWND hwnd, PWINDOWINFO pwi)


Function Documentation

BOOL WINAPI GetWindowInfo (  HWND  hwnd,
PWINDOWINFO  pwi
) 
 

Definition at line 24 of file client/winable.c.

References tagCLS::atomClassName, FALSE, GetWindowBorders(), NULL, tagWND::rcClient, tagWND::rcWindow, REBASEALWAYS, SYSMET, TestWF, TRUE, UINT, ValidateHwnd, VER30, VER31, VER40, VER50, WFFRAMEON, WFWIN31COMPAT, WFWIN40COMPAT, and WFWIN50COMPAT.

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 * Validate the window 00035 */ 00036 pwnd = ValidateHwnd(hwnd); 00037 00038 if (pwnd == NULL) { 00039 return FALSE; 00040 } 00041 00042 try { 00043 // Window rect 00044 pwi->rcWindow = pwnd->rcWindow; 00045 00046 // Client rect 00047 pwi->rcClient = pwnd->rcClient; 00048 00049 // Style 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 // Borders 00057 cBorders = GetWindowBorders(pwnd->style, pwnd->ExStyle, TRUE, FALSE); 00058 pwi->cxWindowBorders = cBorders * SYSMET(CXBORDER); 00059 pwi->cyWindowBorders = cBorders * SYSMET(CYBORDER); 00060 00061 // Type 00062 pclsT = (PCLS)REBASEALWAYS(pwnd, pcls); 00063 pwi->atomWindowType = pclsT->atomClassName; 00064 00065 // Version 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 }


Generated on Sat May 15 19:46:09 2004 for test by doxygen 1.3.7