# include“ltivw.h”
L_LTIVW_APIL_INTl_discontainershowtitlebar (hCellWnd, uShow, uFlags)
显示或隐藏标题栏。
表示“医疗查看器单元格”的窗口的句柄。
标志,指示是否显示标题栏。可能取值为:
| 价值 | 意义 |
|---|---|
| 真正的 | 显示标题栏。 |
| 假 | 不显示标题栏。 |
保留以备将来使用。通过0。
| 价值 | 意义 |
|---|---|
| 成功 | 活动很成功。 |
| < 1 | 发生错误。指返回代码. |
必需的dll和库
这个函数操作标题栏特性。在这个例子中,我们假设用户打开了一个包含一个帧的单元格。
L_INT discontainershowtitlebareexample (hdiscontainer hCon){L_INT镍;DISPCONTAINERTITLEBARPROPS DISPCONTAINERTITLEBARPROPS;DISPCONTAINERTITLEBARICONPROPS DispContainerIconProps;L_INT nRet;如果(l_discontainergetcellcount (hCon, 0) == 0){对话框(NULL,文本("您必须至少将一个单元格添加到查看器"),文本(“无细胞连接”), MB_OK);返回失败;}HWND hCellWnd = l_discontainergetcellwindowhandle (hCon, 0,0);//检查标题栏是否已经显示。如果(!L_DispContainerIsTitlebarEnabled (hCellWnd, 0))//显示标题栏l_discontainershowtitlebar (hCellWnd, TRUE, 0);DispContainerTitlebarProps。uMask = DCTITLEBAR_ALL;DispContainerTitlebarProps。uStructSize =运算符(DISPCONTAINERTITLEBARPROPS);//为标题栏设置更亮的颜色。l_discontainergettitlebarproperties (hCellWnd, & discontainertitlebarprops, 0);如果(DispContainerTitlebarProps.bCustomTitlebarColor){DispContainerTitlebarProps。crColor = RGB(min(255, GetRValue(discontainertitlebarprops .crColor) + 10),min(255, GetGValue(discontainertitlebarprops . crcolor) + 10),min(255, GetBValue(discontainertitlebarprops . crcolor) + 10));l_discontainersettitlebarproperties (hCellWnd, & discontainertitlebarprops, 0);}//反转所有单元格的按钮图标状态。为(nI = 0;nI < 8;倪+ +){DispContainerIconProps。uMask = DCTITLEBAR_ICONPROPS_ALL;DispContainerIconProps。uStructSize =运算符(DISPCONTAINERTITLEBARICONPROPS);nRet = l_discontainergeticonproperties (hCellWnd, nI, & discontainericonprops, 0);如果(DispContainerIconProps.bReadOnly !){l_discontaineristitlebariconchecked (hCellWnd, 0, nI, 0), 0);}nRet = l_discontainerseticonproperties (hCellWnd, nI, & discontainericonprops, 0);}返回成功;}