# CodeGuru Technical FAQs > CodeGuru Individual FAQs >  Visual C++: Why Watch window shows 'unused' for a HWND variable?

## ovidiucucu

*Q*: When expand a variable of type HWND in _Watch_, _QuickWatch_ or _Variables_ window, the following is shown: _unused - CXX0030: Error: expression cannot be evaluated_.



What 'unused' means? Is it an error in program?

*A*: No, it isn't a programming error.
We can find in WINDEF.H


```
DECLARE_HANDLE            (HWND);
```

DECLARE_HANDLE is defined as


```
typedef void *PVOID;
//...
#ifdef STRICT
typedef void *HANDLE;
#define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
#else
typedef PVOID HANDLE;
#define DECLARE_HANDLE(name) typedef HANDLE name
#endif
typedef HANDLE *PHANDLE;
```

There are two situations:
 If STRICT is not defined, HWND is an alias of _void*_.
This case, if let's say a HWND type is required as a function parameter, we can easily make a mistake and pass some other handle type (e.g. HBRUSH which is also void*) or any other pointer type.
That leads in run-time errors and program malfunction. If STRICT is defined, then _STRICT type checking_ is performed.
After preprocessing phase, the above code becomes something like:


```
   struct HWND__ 
   {
      int unused;
   };
   typedef struct HWND__ *HWND;
```

Now, HWND is of type pointer to a structure (HWND__ *) and, if we replace it by mistake with HBRUSH (of type HBRUSH__*) the compiler raises an error, avoiding further run-time troubles.
Example


```
   HBRUSH hBrush = ::CreateSolidBrush(RGB(0, 0, 255));
   // ...
   // Stupid but possible mistake
   ::SetForegroundWindow(hBrush); 
   // Error: cannot convert parameter 1 from 'struct HBRUSH__ *' to 'struct HWND__ *'
```


Notes
 There is a bunch of other handle types defined in the same manner (HBITMAP, HINSTANCE, etc). See WINDEF.H header file. In Windows SDK, STRICT is defined by default. If, for some reason you don't want it, you have to add  NO_STRICT to preprocessor definitions. The C standard states the following: _if the struct-declaration-list contains no named members, the behavior is undefined_, then C compiler from Visual Studio gives an error if we have an empty structure: _error C2016: C requires that a struct or union has at least one member_.
For this reason, HWND__ and the other similar structures have a dummy member, _int unused_.    
Resources
 [MSDN] STRICT Type Checking
Credits
 Thanks *Viorel* for suggesting note #3!

----------

