12-15-2023, 10:36 PM
Code: (Select All)
//////////////////
// When window is activated/deactivated, disable/enable Alt-PrintScreen.
// (IDHOT_SNAPWINDOW)
//
void CMainFrame::OnActivate(UINT nState, CWnd* pWndOther,
BOOL bMinimized)
{
CFrameWnd::OnActivate(nState, pWndOther, bMinimized);
if (nState)
RegisterHotKey(m_hWnd, IDHOT_SNAPWINDOW, MOD_ALT, VK_SNAPSHOT);
else
UnregisterHotKey(m_hWnd, IDHOT_SNAPWINDOW);
}
I think right there is what would be really relevant for you, but read the article itself, also.