[pywin32-checkins] pywin32/Pythonwin win32font.cpp,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-03-05 04:57:19
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7152 Modified Files: win32font.cpp Log Message: Fix [ 1037571 ] PyCFont should have .GetSafeHandle() Index: win32font.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32font.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32font.cpp 15 Apr 2002 15:17:49 -0000 1.2 --- win32font.cpp 5 Mar 2005 04:57:04 -0000 1.3 *************** *** 65,72 **** --- 65,82 ---- } + // @pymethod int|PyCFont|GetSafeHandle|Retrieves the HFONT for the font as an integer + static PyObject *PyCFont_GetSafeHandle(PyObject *self, PyObject *args) + { + CHECK_NO_ARGS2(args, "GetSafeHandle"); + CFont *pFont = PyCFont::GetFont(self); + if (pFont==NULL) return NULL; + return PyInt_FromLong((long)pFont->GetSafeHandle()); + } + // @object PyCFont|A windows font object. Encapsulates an MFC <c CFont> class. // Derived from a <o PyCGDIObject>. static struct PyMethodDef ui_font_methods[] = { + {"GetSafeHandle", PyCFont_GetSafeHandle, 1}, // @pymeth GetSafeHandle|Retrieves the HFONT for the font as an integer {NULL, NULL} // sentinel }; |