FloaterDstClip... example for C++ 5.0 and later
The following code adjusts the destination clipping rectangle of the floater. You can test it by adding it to a new command button for the lesson described in Outlining, Dragging, and Pasting a Region. By default, the destination clipping rectangle for the floater is the full client area. This code gets the current values and uses them to reduce the size of the clipping rectangle.
// Declare local variables.
float AdjustX, AdjustY, NewLeft, NewTop, NewWidth, NewHeight;
// Set variables to use for adjustment increments.
AdjustX = m_LEADRasterView1.GetScaleWidth() / 20;
AdjustY = m_LEADRasterView1.GetScaleHeight() / 20;
// Determine new values, based on adjustments of current values.
NewLeft = m_LEADRasterView1.GetFloaterDstClipLeft() + AdjustX;
NewTop = m_LEADRasterView1.GetFloaterDstClipTop() + AdjustY;
NewWidth = m_LEADRasterView1.GetFloaterDstClipWidth() - (2 * NewLeft);
NewHeight = m_LEADRasterView1.GetFloaterDstClipHeight() - (2 * NewTop);
// Set the clipping rectangle to the new values.
m_LEADRasterView1.SetFloaterDstClipRect(NewLeft, NewTop, NewWidth, NewHeight);