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

Method create

Pythonwin/win32view.cpp:417–431  ·  view source on GitHub ↗

@pymethod |win32ui|CreateView|Creates a generic view object.

Source from the content-addressed store, hash-verified

415
416// @pymethod <o PyCScrollView>|win32ui|CreateView|Creates a generic view object.
417PyObject * PyCScrollView::create(PyObject *self, PyObject *args)
418{
419 PyObject *doc;
420 // @pyparm <o PyCDocument>|doc||The document to use with the view.
421 if (!PyArg_ParseTuple(args, "O:CreateView", &doc))
422 return NULL;
423 if (!ui_base_class::is_uiobject(doc, &PyCDocument::type))
424 RETURN_TYPE_ERR("Argument must be a PyCDocument");
425 CDocument *pDoc = PyCDocument::GetDoc( doc );
426 GUI_BGN_SAVE;
427 CPythonView *pView = new CPythonView();
428 ((CProtectedView *)pView)->SetDocument(pDoc);
429 GUI_END_SAVE;
430 return ui_assoc_object::make( PyCScrollView::type, pView, TRUE );
431}
432
433// @pymethod <o PyCDC>|PyCScrollView|GetDC|Gets the view's current DC.
434static PyObject *

Callers

nothing calls this directly

Calls 2

SetDocumentMethod · 0.45

Tested by

no test coverage detected