# include“l_bitmap.h”
L_LTIVW_APIL_INTEXT_FUNCTIONL_DispContainerGetDefaultWindowLevelValues (hCellWnd、nSubCellIndex pnWidth、pnCenter uFlags)
时默认值,设置窗口水平加载的图像。
一个窗口的句柄表示细胞的功能将被应用的影响。
一个从零开始的索引图像列表nCellIndex中指定的细胞。这张照片包含默认的窗口级别值被检索。通过2检索默认窗口选择sub-cell的水平值。
变量的地址更新默认窗口水平宽度值。
变量的地址更新默认窗口水平中心价值。
保留以供将来使用。通过0。
价值 | 意义 |
---|---|
成功 | 函数是成功的。 |
< 1 | 一个错误发生。指返回代码。 |
这个函数不会获取当前窗口的水平值。获取当前窗口水平值调用L_DispContainerGetActionProperties。设置当前窗口水平值调用L_DispContainerSetActionProperties
这个函数不会获取当前窗口的水平值;它将默认的。默认值可以使用通过设置L_DispContainerSetDefaultWindowLevelValues或者可以在内部计算当图像是第一次设置在控制使用L_DispContainerSetCellBitmapList或L_DispContainerSetRequestedImage(低内存使用功能启用时)。关于低内存使用功能的更多信息,参考函数L_DispContainerEnableCellLowMemoryUsage。
重置窗口水平值默认值使用函数L_DispContainerResetWindowLevelValues。
必需的dll和库
平台
工具箱在Win32和x64版本能够支持开发软件应用程序的下列环境:
Windows 10
Windows 8
Windows 7
Windows Vista
Windows XP
Windows 2000
这个例子改变默认的窗口级别值通过减少宽度100。然后重置图像基于新值。
L_INT DispContainerGetDefaultWindowLevelExamples (HDISPCONTAINER hCon)
{
L_INT nRet;
L_INT nWidth;
L_INT nCenter;
如果(L_DispContainerGetCellCount (hCon 0) = = 0)
{
对话框(NULL,文本(“你必须至少有一个细胞添加到查看器”),文本(“没有附加细胞”),MB_OK);
返回失败;
}
HWND hCellWnd = L_DispContainerGetCellWindowHandle (hCon, 0, 0);
nRet = L_DispContainerGetDefaultWindowLevelValues (hCellWnd 0 &nWidth &nCenter 0);
如果(nRet ! =成功)
返回nRet;
nWidth - = 100;
nRet = L_DispContainerSetDefaultWindowLevelValues (hCellWnd 0 nWidth nCenter 0);
如果(nRet ! =成功)
返回nRet;
nRet = L_DispContainerResetWindowLevelValues (hCellWnd, 0, 0);
如果(nRet ! =成功)
返回nRet;
返回成功;
}