Since GetWindowRect
takes LPRECT
as the second parameter, there is no way to pass RectEx
.
What you can do to use RectEx
, you can overload typecasting operator as follows
operator LPRECT () const
{
return &dimensions;
}
However, overloading typecasting is not recommended due to undesired type conversion. Only do when you are sure about it.