Creates new selection by the specified selection ID.
Syntax
HRESULT CreateStdSel ([in] ULONG nSelID, |
[out, retval] IPXV_DocSelection** pNewSel); |
Parameters
- nSelID
- [in] Value of ULONG containing the ID selection that needs to be created.
- pNewSel
- [out, retval] Pointer to IPXV_DocSelection containing the resulting selection.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Sample
02 | private void SetContentColor(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) |
07 | int nID = Inst.Str2ID( "op.contentItems.setProps" , false ); |
08 | PDFXEdit.IOperation Op = Inst.CreateOp(nID); |
09 | var input = Op.Params.Root[ "Input" ]; |
10 | input.Add().v = Doc.CoreDoc; |
11 | PDFXEdit.ICabNode options = Op.Params.Root[ "Options" ]; |
12 | int nSelID = Inst.Str2ID( "selection.contentItems" , false ); |
15 | PDFXEdit.IPXV_ContentItemsSelection itSel = (PDFXEdit.IPXV_ContentItemsSelection)Doc.CreateStdSel(( uint )nSelID); |
17 | PDFXEdit.IPXV_ContentItemEntry itEntry = itSel.GetSel(nPage, true ); |
19 | var content = Doc.CoreDoc.Pages[nPage].GetContent(PDFXEdit.PXC_ContentAccessMode.CAccessMode_WeakClone); |
20 | for ( uint i = 0; i < content.Items.Count; i++) |
23 | if (content.Items[i].Type == PDFXEdit.PXC_CIType.CIT_Text) |
27 | options[ "Entries" ].Add(PDFXEdit.CabDataTypeID.dt_IUnknown).v = itEntry; |
29 | options[ "FColor" ].v = "#AC3312" ; |
31 | options[ "Mask" ].v = 2; |
See Also
IPXV_Document