@pymethod |PyCTreeCtrl|GetItem|Retrieves the details of an items attributes.
| 548 | |
| 549 | // @pymethod <o TV_ITEM>|PyCTreeCtrl|GetItem|Retrieves the details of an items attributes. |
| 550 | PyObject *PyCTreeCtrl_GetItem( PyObject *self, PyObject *args ) |
| 551 | { |
| 552 | HTREEITEM item; |
| 553 | UINT mask = TVIF_CHILDREN | TVIF_HANDLE | TVIF_IMAGE | TVIF_PARAM | TVIF_SELECTEDIMAGE | TVIF_STATE | TVIF_TEXT; |
| 554 | |
| 555 | if (!PyArg_ParseTuple( args, "i|i:GetItem", |
| 556 | &item, // @pyparm HTREEITEM|item||The item whose attributes are to be retrieved. |
| 557 | &mask)) // @pyparm int|mask|(all flags set)|The requested attributes. |
| 558 | return NULL; |
| 559 | |
| 560 | CTreeCtrl *pList = GetTreeCtrl(self); |
| 561 | if (!pList) return NULL; |
| 562 | TCHAR textBuf[256]; |
| 563 | TV_ITEM tvItem; |
| 564 | tvItem.hItem = item; |
| 565 | tvItem.pszText = textBuf; |
| 566 | tvItem.cchTextMax = sizeof(textBuf)/sizeof(TCHAR); |
| 567 | tvItem.mask = mask; |
| 568 | GUI_BGN_SAVE; |
| 569 | BOOL ok = pList->GetItem( &tvItem); |
| 570 | GUI_END_SAVE; |
| 571 | if (!ok) |
| 572 | RETURN_ERR("GetItem failed"); |
| 573 | return PyWinObject_FromTV_ITEM(&tvItem); |
| 574 | } |
| 575 | |
| 576 | // @pymethod int|PyCTreeCtrl|GetItemText|Retrieves the text of a list view item or subitem. |
| 577 | PyObject *PyCTreeCtrl_GetItemText( PyObject *self, PyObject *args ) |
nothing calls this directly
no test coverage detected