Where is the huge difference, which generates error C2360, in following two definitions?
switch (msg) {
case WM_PAINT:
HDC hdc;
hdc = BeginPaint(hWnd, &ps); // No error
break;
}
and
switch (msg) {
case WM_PAINT:
HDC hdc = BeginPaint(hWnd, &ps); // Error
break;
}