UINT Main_OnNCHitTest(HWND hwnd, int x, int y) { POPTIONS pOpt = GetAppbarData(hwnd); LRESULT lHitTest; // Take care of the autohide stuff if needed AppBar_SetAutoUnhideTimer(hwnd); // Let DefWindowProc() tell us where the mouse is lHitTest = FORWARD_WM_NCHITTEST(hwnd, x, y, DefWindowProc); // We want to disable sizing in all directions except the inside edge. if ((pOpt->uSide == ABE_TOP) && (lHitTest == HTBOTTOM)) { return HTBOTTOM; } if ((pOpt->uSide == ABE_BOTTOM) && (lHitTest == HTTOP)) { return HTTOP; } if ((pOpt->uSide == ABE_LEFT) && (lHitTest == HTRIGHT)) { return HTRIGHT; } if ((pOpt->uSide == ABE_RIGHT) && (lHitTest == HTLEFT)) { return HTLEFT; } return HTCLIENT; }
LOCAL UINT Slider_OnNCHitTest(HWND hWindow, int x, int y) /***********************************************************************/ { UINT uReturn = FORWARD_WM_NCHITTEST(hWindow, x, y, DefWindowProc); if ( SHIFT && (uReturn == HTCLIENT) ) uReturn = HTCAPTION; return (uReturn); }