L_DispContainerShowTitlebar

Summary

Shows or hides the title bar.

Syntax

#include "ltivw.h"

L_LTIVW_API L_INT L_DispContainerShowTitlebar(hCellWnd, uShow, uFlags)

Parameters

L_HWND hCellWnd

A handle to the window that represents the Medical Viewer Cell.

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 DispContainerShowTitlebarExample(HDISPCONTAINER hCon)  
{ 
   L_INT                          nI; 
   DISPCONTAINERTITLEBARPROPS     DispContainerTitlebarProps; 
   DISPCONTAINERTITLEBARICONPROPS DispContainerIconProps; 
   L_INT                          nRet; 
 
   if (L_DispContainerGetCellCount(hCon, 0) == 0) 
   { 
      MessageBox(NULL, TEXT("you must at least have one cell added to the viewer"), TEXT("No Cell attached"), MB_OK); 
      return FAILURE; 
   } 
 
   HWND hCellWnd = L_DispContainerGetCellWindowHandle(hCon, 0, 0); 
 
 
   // Check if the title bar is already shown or not. 
   if (!L_DispContainerIsTitlebarEnabled(hCellWnd, 0)) 
      // Show the title bar. 
      L_DispContainerShowTitlebar(hCellWnd, TRUE, 0); 
 
   DispContainerTitlebarProps.uMask = DCTITLEBAR_ALL; 
   DispContainerTitlebarProps.uStructSize = sizeof(DISPCONTAINERTITLEBARPROPS); 
   // Set a brighter color for the title bar. 
   L_DispContainerGetTitlebarProperties(hCellWnd, &DispContainerTitlebarProps, 0); 
 
   if (DispContainerTitlebarProps.bCustomTitlebarColor) 
   { 
      DispContainerTitlebarProps.crColor = RGB(min(255, GetRValue(DispContainerTitlebarProps.crColor) + 10), 
                                               min(255, GetGValue(DispContainerTitlebarProps.crColor) + 10), 
                                               min(255, GetBValue(DispContainerTitlebarProps.crColor) + 10)); 
 
      L_DispContainerSetTitlebarProperties(hCellWnd, &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 = L_DispContainerGetIconProperties(hCellWnd, nI, &DispContainerIconProps, 0); 
 
      if (!DispContainerIconProps.bReadOnly) 
      { 
         L_DispContainerCheckTitlebarIcon(hCellWnd, 0, nI, !L_DispContainerIsTitlebarIconChecked(hCellWnd, 0, nI, 0), 0); 
      } 
      nRet = L_DispContainerSetIconProperties(hCellWnd, nI, &DispContainerIconProps, 0); 
   } 
   return SUCCESS; 
} 

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

LEADTOOLS Medical Image Viewer C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.