ToolPaletteHidden Example VC++

In this example, when the ToolPaletteHidden event fires, the TPLeft and TPTop global variables are assigned to the coordinates of the Annotation Tool Palette (before it was hidden).

These values can be used by the ShowAnnotationToolPalette method to have the tool palette reappear at the same coordinates.

void CImgEdit2Dlg::OnToolPaletteHidden(long Left, long Top) 
{
    // This event could be used to track the current location of
    // the tool palette when it is hidden so that it could be shown
    // at the same location when it is shown again.
   // Dimension TPLeft and TPTop as global long variables
   long TPLeft = Left;
   long TPTop = Top;
   // Pass TPLeft and TPTop in to the ShowAnnotationToolPalette
   // method.
}