Exemplo n.º 1
0
//Call this function when the toolbar recieves a WM_MOVE or WM_SIZE
void WindowMagnetizer::OnToolbarBoundsChanged()
{
	//No need to erase the last focus rect, the toolbar already covers it
	lastFocusRect.left=INT_MIN;
	//Eventually move the toolbar
	CheckToolbarPos();
	BOOL dfw;
	SystemParametersInfo(SPI_GETDRAGFULLWINDOWS,0,&dfw,0);
	if(!dfw)
	{
		//Completely repaint the toolbar
		InvalidateRect(toolbar,NULL,TRUE);
		RECT tbRect;
		GetWindowRect(toolbar,&tbRect);
		HRGN refRgn = CreateRectRgnIndirect(&tbRect);
		FORWARD_WM_NCPAINT(toolbar,refRgn,SendMessage);
		DeleteRgn(refRgn);
	}
}
Exemplo n.º 2
0
BOOL ZoomBox_NcActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized)
/************************************************************************/
{
   FORWARD_WM_NCPAINT(hwnd, NULL/*hrgn*/, ::SendMessage);
   return(TRUE);
}