LImageViewerCell::ShowTitlebar

#include "ltwrappr.h"

L_INT LImageViewerCell::ShowTitlebar(uShow, uFlags)

Shows or hides the title bar.

Parameters

L_UINT uShow

Flag that indicates whether to show the title bar. Possible values are:

Value Meaning
TRUE Show the title bar.
FALSE Do not show the title bar.

L_UINT uFlags

Reserved for future use. Pass 0.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This function manipulates the title bar feature. In this sample we assume that the user has opened one cell that contains one frame.

L_INT LImageViewer_ShowTitlebarExample(LImageViewerCell& ImageViewerCell)  
{ 
   L_INT nI;  
   DISPCONTAINERTITLEBARPROPS DispContainerTitlebarProps;  
   DISPCONTAINERTITLEBARICONPROPS DispContainerIconProps;  
   L_INT nRet = 0;  
 
   // Check if the title bar is already shown or not.  
   if (!ImageViewerCell.IsTitlebarEnabled(0))  
      // Show the title bar.  
      nRet =  ImageViewerCell.ShowTitlebar(TRUE, 0);  
      if(nRet != SUCCESS) 
      { 
         return nRet; 
      } 
    
 
   DispContainerTitlebarProps.uMask = DCTITLEBAR_ALL;  
   DispContainerTitlebarProps.uStructSize = sizeof(DISPCONTAINERTITLEBARPROPS);  
   // Retrieve the title bar properties. 
   ImageViewerCell.GetTitlebarProperties (&DispContainerTitlebarProps, 0);  
 
   if (DispContainerTitlebarProps.bCustomTitlebarColor)  
   { 
      // Brighter color for the title bar. 
      DispContainerTitlebarProps.crColor = RGB(min(255, GetRValue(DispContainerTitlebarProps.crColor) + 10),  
                                               min(255, GetGValue(DispContainerTitlebarProps.crColor) + 10),  
                                               min(255, GetBValue(DispContainerTitlebarProps.crColor) + 10));  
 
      // Change the title bar properties. 
      ImageViewerCell.SetTitlebarProperties (&DispContainerTitlebarProps, 0);  
   } 
 
   // Invert the button icon status for all the cells.  
   for (nI = 0; nI < 8; nI++) 
   { 
      DispContainerIconProps.uMask = DCTITLEBAR_ICONPROPS_ALL;  
      DispContainerIconProps.uStructSize = sizeof(DISPCONTAINERTITLEBARICONPROPS);  
 
      nRet = ImageViewerCell.GetIconProperties (nI, &DispContainerIconProps, 0);  
 
      if (!DispContainerIconProps.bReadOnly)  
      { 
         ImageViewerCell.CheckTitlebarIcon(0, nI, !ImageViewerCell.IsTitlebarIconChecked(0, nI, 0), 0);  
      } 
      nRet = ImageViewerCell.SetIconProperties (nI, &DispContainerIconProps, 0);  
   } 
   return SUCCESS;  
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Medical Image Viewer C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.