The year is 2018 and Window 10 almost completely pushed out Windows 8. Win8's "hot corners" are again cold in Win10 - they were obviously a great success. But if you still need to disable them in Win8.x/Win2012 and end up here searching for a solution (as I did), here's how I solved it.
I realised that Windows disables them automatically if a full-screen application is active and covering the task-bar. Since my application is dialog-based and not full-screen, I create a transparent window (transparent optically and transparent for input) and set it as the parent window for my dialog. Now this invisible window covers the whole screen -> hot corners are disabled.
Something like this (simplified):
int nVirtualScreenLeft = GetSystemMetrics (SM_XVIRTUALSCREEN);
int nVirtualScreenTop = GetSystemMetrics (SM_YVIRTUALSCREEN);
int nVirtualScreenWidth = GetSystemMetrics (SM_CXVIRTUALSCREEN);
int nVirtualScreenHeight = GetSystemMetrics (SM_CYVIRTUALSCREEN);
HWND hwndFullScreenInvisible = CreateWindowEx(
WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW,
_T("Static"), strWindowCaption,
WS_VISIBLE | WS_POPUP,
nVirtualScreenLeft, nVirtualScreenTop, nVirtualScreenWidth, nVirtualScreenHeight,
HWND_DESKTOP, NULL, NULL, NULL);
if (hwndFullScreenInvisible != NULL)
{
BOOL bRet = SetLayeredWindowAttributes (hwndFullScreenInvisible, /*COLORREF = */ 0, /* byAlpha = */ 0, LWA_ALPHA);
}
CMyDlg dlg (CWnd::FromHandle(hwndFullScreenInvisible));
dlg.DoModal ();