The message loop generated by class wizard often looks like
while( GetMessage() )
{
if( !TranslateAccelerator() )
{
TranslateMessage();
DispatchMessage();
}
}
Whereas TranslateAccelerator documentation says:
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
In my tests, when the only reason why the TranslateAccelerator failed was no accelerator was found for this particular message, GetLastError returned 0==ERROR_SUCCESS.
I'm just curious, are there any realistic conditions when TranslateAccelerator fails because of some other reason, and the message should not be translated & dispatched?
Thanks in advance!