MCPcopy Create free account
hub / github.com/mhammond/pywin32 / PyCTreeCtrl_CreateWindow

Function PyCTreeCtrl_CreateWindow

Pythonwin/win32ctrlTree.cpp:61–92  ·  view source on GitHub ↗

@pymethod |PyCTreeCtrl|CreateWindow|Creates the actual window for the object.

Source from the content-addressed store, hash-verified

59
60// @pymethod |PyCTreeCtrl|CreateWindow|Creates the actual window for the object.
61static PyObject *
62PyCTreeCtrl_CreateWindow(PyObject *self, PyObject *args)
63{
64 extern CWnd *GetWndPtrFromParam(PyObject *ob, ui_type_CObject &type);
65
66 CTreeCtrl *pT = GetTreeCtrl(self, false);
67 if (!pT) return NULL;
68 RECT rect;
69 PyObject *obParent;
70 long style;
71 long id;
72 if(!PyArg_ParseTuple(args, "l(iiii)Ol:Create",
73 &style, // @pyparm int|style||The window style
74 &rect.left, &rect.top, &rect.right,&rect.bottom, // @pyparm int, int, int, int|rect||The default rectangle
75 &obParent, // @pyparm parent|<o PyCWnd>||The parent window
76 &id))// @pyparm int|id||The control ID
77 return NULL;
78
79 CWnd *pParent = NULL;
80 if (obParent != Py_None) {
81 pParent = GetWndPtrFromParam(obParent, PyCWnd::type);
82 if (pParent==NULL) return NULL;
83 }
84
85 GUI_BGN_SAVE;
86 // @pyseemfc CTreeCtrl|Create
87 BOOL ok = pT->Create(style, rect, pParent, id);
88 GUI_END_SAVE;
89 if (!ok)
90 RETURN_ERR("CTreeCtrl::Create failed");
91 RETURN_NONE;
92}
93
94#define MAKE_GET_INT_METH(fnname, mfcName) \
95PyObject *fnname( PyObject *self, PyObject *args ) { \

Callers

nothing calls this directly

Calls 3

GetTreeCtrlFunction · 0.85
GetWndPtrFromParamFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected