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

Function PyCListCtrl_CreateWindow

Pythonwin/win32ctrlList.cpp:60–91  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

GetListCtrlFunction · 0.85
GetWndPtrFromParamFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected