[pywin32-checkins] pywin32/Pythonwin win32win.cpp,1.8,1.9
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-04-18 13:36:55
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15464 Modified Files: win32win.cpp Log Message: Allow PyCWnd.CreateControl to pass a license strings will NULL characters, and pass missing params to this function from the activex.py framework. Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32win.cpp 7 Oct 2004 07:45:57 -0000 1.8 --- win32win.cpp 18 Apr 2005 13:36:46 -0000 1.9 *************** *** 395,400 **** PyObject *obPersist = Py_None; int bStorage = FALSE; ! const char *szClass, *szWndName, *szLicKey = NULL; ! if (!PyArg_ParseTuple(args, "szi(iiii)Oi|Oiz", &szClass, // @pyparm string|classId||The class ID for the window. &szWndName, // @pyparm string|windowName||The title for the window. --- 395,401 ---- PyObject *obPersist = Py_None; int bStorage = FALSE; ! const char *szClass, *szWndName; ! PyObject *obLicKey = Py_None; ! if (!PyArg_ParseTuple(args, "szi(iiii)Oi|OiO", &szClass, // @pyparm string|classId||The class ID for the window. &szWndName, // @pyparm string|windowName||The title for the window. *************** *** 406,410 **** &obPersist, // @pyparm object|obPersist|None|Place holder for future support. &bStorage, // @pyparm int|bStorage|FALSE|Not used. ! &szLicKey ))// @pyparm string|licKey|None|The licence key for the control. return NULL; --- 407,411 ---- &obPersist, // @pyparm object|obPersist|None|Place holder for future support. &bStorage, // @pyparm int|bStorage|FALSE|Not used. ! &obLicKey ))// @pyparm string|licKey|None|The licence key for the control. return NULL; *************** *** 420,429 **** if (pWnd==NULL || pWndParent==NULL) return NULL; ! // This will cause MFC to die after dumping a message to the debugget! if (afxOccManager == NULL) RETURN_ERR("win32ui.EnableControlContainer() has not been called yet."); BOOL ok; GUI_BGN_SAVE; ! ok = pWnd->CreateControl(clsid, szWndName, style, rect, pWndParent, id, NULL, bStorage, T2OLE(szLicKey)); GUI_END_SAVE; if (!ok) --- 421,434 ---- if (pWnd==NULL || pWndParent==NULL) return NULL; ! PyWin_AutoFreeBstr bstrLicKey; ! if (obLicKey != Py_None && !PyWinObject_AsAutoFreeBstr(obLicKey, &bstrLicKey, TRUE)) ! return NULL; ! ! // This will cause MFC to die after dumping a message to the debugger! if (afxOccManager == NULL) RETURN_ERR("win32ui.EnableControlContainer() has not been called yet."); BOOL ok; GUI_BGN_SAVE; ! ok = pWnd->CreateControl(clsid, szWndName, style, rect, pWndParent, id, NULL, bStorage, bstrLicKey); GUI_END_SAVE; if (!ok) |