#include "ltivw.h"
L_LTIVW_API L_INT L_DispContainerShowTitlebar(hCellWnd, uShow, uFlags)
Shows or hides the title bar.
A handle to the window that represents the Medical Viewer Cell.
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. |
Reserved for future use. Pass 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Required DLLs and Libraries
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;
}