网站首页  词典首页

请输入您要查询的函数:

 

术语 selectpalette
释义 SelectPalette
语法:
HPALETTE SelectPalette(
__in HDC hdc,
__in HPALETTE hpal,
__in BOOL bForceBackground
);
SelectPalette函数
SelectPalette函数的选择到设备上下文指定的逻辑调色板。
参数
hdc [in]
一个句柄,设备上下文。
hpal [in]
一个句柄,逻辑调色板被选中。
bForceBackground [in]
指定是否逻辑调色板被强制为背景调色板。如果该值为TRUE,RealizePalette函数导致逻辑调色板被映射已经在物理调色板的颜色,最好的方式。这是经常做,即使该调色板为实现窗口属于一个线程,没有积极的焦点。
如果该值为FALSE,RealizePalette导致逻辑调色板被纳入调色板复制设备的应用程序时,在前台的。 (如果为HDC参数是一个内存设备上下文,此参数被忽略。)
返回值
如果函数成功,返回值是一个设备句柄上下文的逻辑调色板上。
如果函数失败,返回值为NULL。
备注
应用程序可以判断设备是否支持通过调用GetDeviceCaps函数并指定RASTERCAPS不断调色板行动。
应用程序可以选择一到多个设备环境的逻辑调色板只有当设备上下文是相容的。否则SelectPalette失败。要创建一个设备上下文是与其他设备兼容的情况下,调用CreateCompatibleDC与作为参数第一个设备上下文。如果一个逻辑调色板分为多个设备的背景下,逻辑调色板的变化将影响到所有选定的设备,这就是它选择背景。
应用程序可能会调用设置为TRUE bForceBackground参数SelectPalette函数,如果一个顶层窗口的子窗口每实现自己的调色板。但是,只有子窗口,需要实现自己的调色板必须设置为TRUE bForceBackground,其他子窗口必须设置此值为FALSE。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
颜色概述
颜色函数
CreateCompatibleDC
CreatePalette
GetDeviceCaps
RealizePalette
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SelectPalette Function
The SelectPalette function selects the specified logical palette into a device context.
Syntax
HPALETTE SelectPalette(
__in HDC hdc,
__in HPALETTE hpal,
__in BOOL bForceBackground
);
Parameters
hdc [in]
A handle to the device context.
hpal [in]
A handle to the logical palette to be selected.
bForceBackground [in]
Specifies whether the logical palette is forced to be a background palette. If this value is TRUE, the RealizePalette function causes the logical palette to be mapped to the colors already in the physical palette in the best possible way. This is always done, even if the window for which the palette is realized belongs to a thread without active focus.
If this value is FALSE, RealizePalette causes the logical palette to be copied into the device palette when the application is in the foreground. (If the hdc parameter is a memory device context, this parameter is ignored.)
Return Value
If the function succeeds, the return value is a handle to the device context's previous logical palette.
If the function fails, the return value is NULL.
Remarks
An application can determine whether a device supports palette operations by calling the GetDeviceCaps function and specifying the RASTERCAPS constant.
An application can select a logical palette into more than one device context only if device contexts are compatible. Otherwise SelectPalette fails. To create a device context that is compatible with another device context, call CreateCompatibleDC with the first device context as the parameter. If a logical palette is selected into more than one device context, changes to the logical palette will affect all device contexts for which it is selected.
An application might call the SelectPalette function with the bForceBackground parameter set to TRUE if the child windows of a top-level window each realize their own palettes. However, only the child window that needs to realize its palette must set bForceBackground to TRUE; other child windows must set this value to FALSE.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Colors Overview
Color Functions
CreateCompatibleDC
CreatePalette
GetDeviceCaps
RealizePalette
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162958(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:23:29