get-graphics-offsets: Set error mode to SEM_FAILCRITICALERRORS

This prevents spurious dialog boxes appearing, such as "No disk is in the
drive" if the application attempts to access an invalid drive.
master
Richard Stanway 2017-06-21 17:41:26 +02:00
parent cef0689a36
commit 8ad8e18d04
No known key found for this signature in database
GPG Key ID: AAC1E5265D71B3FD
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ int main(int argc, char *argv[])
wc.lpfnWndProc = (WNDPROC)DefWindowProcA;
wc.lpszClassName = DUMMY_WNDCLASS;
SetErrorMode(SEM_FAILCRITICALERRORS);
if (!RegisterClassA(&wc)) {
printf("failed to register '%s'\n", DUMMY_WNDCLASS);
return -1;