getpaletteentries

本文介绍了GetPaletteEntries函数的功能及使用方法。此函数用于从指定的逻辑调色板中提取指定范围内的调色板项目,并返回提取的项目数量。文章详细解释了函数参数及其返回值的意义。
  name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-5572165936844014&dt=1193665761703&lmt=1193665780&format=336x280_as&output=html&correlator=1193665761687&url=http%3A%2F%2Fwww.codeguru.cn%2Fpublic%2Fiframe%2Fwinapiiframe.htm&color_bg=FFFFFF&color_text=000000&color_link=000000&color_url=FFFFFF&color_border=FFFFFF&ad_type=text&ga_vid=1285758818.1193665762&ga_sid=1193665762&ga_hid=111695597&flash=9&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=32&u_tz=480&u_his=8&u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="allowtransparency">     函数功能:该函数从给定的逻辑调色板中提出指定范围的调色板项目。

    函数原型:UINT GetPaletteEntries(HPALETTE hpal, UINT iStartIndex, UINT nEntries, LPPALETTEENTRY lppe);

    参数:

    hpal:逻辑调色板句柄。

    iStartIndex:指定要提取的逻辑调色板中的第一项。

    nEntries:指定要提取的逻辑调色板中的项数。

    lppe:指向接受调色项目的PALETTEENTRY结构数组的指针,该数组所含结构的数目至少为nEntries参数指定的数目。

    返回值:如果函数成功,且逻辑调色板的句柄是一个可靠的指针(非零),返回值是从逻辑调色板提取的项目数。如函数成功,且逻辑调色板的指针为零,返回值是给定调色板的项数。如函数失败,返回值为零。

    Windows NT:若想获得更多错误信息,请调用GetLastError函数。

    速查:Windows NT:3.1及以上版本;Windows:95及以上版本;Windows CE:2.0及以上版本;头文件:wingdi.h;库文件:gdi32.lib。

import { assign } from "min-dash"; /** * A palette provider for BPMN 2.0 elements. */ export default function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) { this._palette = palette; this._create = create; this._elementFactory = elementFactory; this._spaceTool = spaceTool; this._lassoTool = lassoTool; this._handTool = handTool; this._globalConnect = globalConnect; this._translate = translate; palette.registerProvider(this); } PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"]; PaletteProvider.prototype.getPaletteEntries = function() { var actions = {}, create = this._create, elementFactory = this._elementFactory, spaceTool = this._spaceTool, lassoTool = this._lassoTool, handTool = this._handTool, globalConnect = this._globalConnect, translate = this._translate; function createAction(type, group, className, title, options) { function createListener(event) { var shape = elementFactory.createShape(assign({ type: type }, options)); if (options) { shape.businessObject.di.isExpanded = options.isExpanded; } create.start(event, shape); } var shortType = type.replace(/^bpmn:/, ""); return { group: group, className: className, title: title || translate("Create {type}", { type: shortType }), action: { dragstart: createListener, click: createListener } }; } function createSubprocess(event) { var subProcess = elementFactory.createShape({ type: "bpmn:SubProcess", x: 0, y: 0, isExpanded: true }); var startEvent = elementFactory.createShape({ type: "bpmn:StartEvent", x: 40, y: 82, parent: subProcess }); create.start(event, [subProcess, startEvent], { hints: { autoSelect: [startEvent] } }); } function createParticipant(event) { create.start(event, elementFactory.createParticipantShape()); } assign(actions, { "hand-tool": { group: "tools", className: "bpmn-icon-hand-tool", title: translate("Activate the hand tool"), action: { click: function(event) { handTool.activateHand(event); } } }, "lasso-tool": { group: "tools", className: "bpmn-icon-lasso-tool", title: translate("Activate the lasso tool"), action: { click: function(event) { lassoTool.activateSelection(event); } } }, "space-tool": { group: "tools", className: "bpmn-icon-space-tool", title: translate("Activate the create/remove space tool"), action: { click: function(event) { spaceTool.activateSelection(event); } } }, "global-connect-tool": { group: "tools", className: "bpmn-icon-connection-multi", title: translate("Activate the global connect tool"), action: { click: function(event) { globalConnect.toggle(event); } } }, "tool-separator": { group: "tools", separator: true }, "create.start-event": createAction("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", translate("Create StartEvent")), "create.intermediate-event": createAction( "bpmn:IntermediateThrowEvent", "event", "bpmn-icon-intermediate-event-none", translate("Create Intermediate/Boundary Event") ), "create.end-event": createAction("bpmn:EndEvent", "event", "bpmn-icon-end-event-none", translate("Create EndEvent")), "create.exclusive-gateway": createAction("bpmn:ExclusiveGateway", "gateway", "bpmn-icon-gateway-none", translate("Create Gateway")), "create.user-task": createAction("bpmn:UserTask", "activity", "bpmn-icon-user-task", translate("Create User Task")), "create.data-object": createAction("bpmn:DataObjectReference", "data-object", "bpmn-icon-data-object", translate("Create DataObjectReference")), "create.data-store": createAction("bpmn:DataStoreReference", "data-store", "bpmn-icon-data-store", translate("Create DataStoreReference")), "create.subprocess-expanded": { group: "activity", className: "bpmn-icon-subprocess-expanded", title: translate("Create expanded SubProcess"), action: { dragstart: createSubprocess, click: createSubprocess } }, "create.participant-expanded": { group: "collaboration", className: "bpmn-icon-participant", title: translate("Create Pool/Participant"), action: { dragstart: createParticipant, click: createParticipant } }, "create.group": createAction("bpmn:Group", "artifact", "bpmn-icon-group", translate("Create Group")) }); return actions; }; 我想使用bpmn自定义组件,让用户在左侧菜单栏添加个用户审批任务和一个serviceTask,两个自定义组件
最新发布
09-29
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值