Exemplo n.º 1
0
	bool Window::resize( int width, int height )
	{
		mWidth = width;
		mHeight = height;

		/// make sure the client area is 'mWidth' * 'mHeight'
		bool resizeable = isResizeable();
		if( resizeable )
		{
			width = mWidth + 2 * GetSystemMetrics( SM_CXSIZEFRAME );
			height = mHeight + 2 * GetSystemMetrics( SM_CYSIZEFRAME );
		}
		else
		{
			width = mWidth + 2 * GetSystemMetrics( SM_CXFIXEDFRAME );
			height = mHeight + 2 * GetSystemMetrics( SM_CYFIXEDFRAME );			
		}

		height += GetSystemMetrics( SM_CYCAPTION );

		/// if the window has menu bar
		HMENU menu = ::GetMenu( mHandle );
		if( menu != NULL )
		{
			height += GetSystemMetrics( SM_CYMENU );
		}

		return ::MoveWindow( mHandle, mX, mY, width, height, TRUE ) != 0 ? true : false;
	}
void fp_EmbedRun::_drawResizeBox(UT_Rect box)
{
        _getView()->drawSelectionBox(box,isResizeable());
}
void MainWindow::on_btnResizeable_clicked()
{
    setResizeable(!isResizeable());
}