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

Function PyCStatusBarCtrl_create_window

Pythonwin/win32control.cpp:2030–2060  ·  view source on GitHub ↗

@pymethod |PyCStatusBarCtrl|CreateWindow|Creates the actual control.

Source from the content-addressed store, hash-verified

2028
2029// @pymethod |PyCStatusBarCtrl|CreateWindow|Creates the actual control.
2030PyObject *
2031PyCStatusBarCtrl_create_window(PyObject *self, PyObject *args)
2032{
2033 int style, id;
2034 PyObject *obParent;
2035 RECT rect;
2036 if (!PyArg_ParseTuple(args, "i(iiii)Oi:CreateWindow",
2037 &style, // @pyparm int|style||The style for the control.
2038 &rect.left,&rect.top,&rect.right,&rect.bottom,
2039 // @pyparm (left, top, right, bottom)|rect||The size and position of the control.
2040 &obParent, // @pyparm <o PyCWnd>|parent||The parent window of the control. Usually a <o PyCDialog>.
2041 &id )) // @pyparm int|id||The control's ID.
2042 return NULL;
2043
2044 if (!ui_base_class::is_uiobject(obParent, &PyCWnd::type))
2045 RETURN_TYPE_ERR("parent argument must be a window object");
2046 CWnd *pParent = GetWndPtr( obParent );
2047 if (pParent==NULL)
2048 return NULL;
2049 CStatusBarCtrl *pPC = GetStatusBarCtrl(self);
2050 if (!pPC)
2051 return NULL;
2052
2053 BOOL ok;
2054 GUI_BGN_SAVE;
2055 ok = pPC->Create(style, rect, pParent, id);
2056 GUI_END_SAVE;
2057 if (!ok)
2058 RETURN_ERR("CStatusBarCtrl::Create");
2059 RETURN_NONE;
2060}
2061
2062// @pymethod (width, height, spacing)|PyCStatusBarCtrl|GetBorders|Retrieve the status bar control's current widths of the horizontal and vertical borders and of the space between rectangles.
2063

Callers

nothing calls this directly

Calls 3

GetWndPtrFunction · 0.85
GetStatusBarCtrlFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected