GetClientRect panic when error is return.
ReleaseDC return false when error is return.
CreateWindowEx return null and ignore the real error message. (I have verified the GetLastError api will not return error when this api fail.)
Here is my suggest:
- Use MustGetClientRect to show the this function will panic when error is return.(so the caller can not simple ignore the error, it will stop the program when the error occured. the caller can ignore it will recover )
- Use GetClientRect return a error type to show if there is an error. (so the caller can ignore it easier)
GetClientRect panic when error is return.
ReleaseDC return false when error is return.
CreateWindowEx return null and ignore the real error message. (I have verified the GetLastError api will not return error when this api fail.)
Here is my suggest: