What is Visual Studio
trying to tell me with this warning?
According to the docs, this warning is when you're passing a potentially null value to a parameter.
But I'm checking for null with if (hwnd)
before calling these functions.
if (hwnd) {
GetClientRect(hwnd, (LPRECT)&rMyRect);
ClientToScreen(hwnd, (LPPOINT)&rMyRect.left);
ClientToScreen(hwnd, (LPPOINT)&rMyRect.right);
}
The fact that you test for it is not relevant, the compiler isn't detecting that test. You can, however, use:
#pragma warning(suppress : 6387)
on the prior line and that will prevent the message (or use __Pragma(warning(suppress : 6387)) but I prefer the #pragma form.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With