[pywin32-checkins] pywin32/Pythonwin win32win.cpp,1.10,1.11
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2006-12-04 22:52:28
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10924 Modified Files: win32win.cpp Log Message: [ 1608456 ] SetIcon() for PyCWnd Contributed by ckuhlmann Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** win32win.cpp 11 Jul 2006 05:18:30 -0000 1.10 --- win32win.cpp 4 Dec 2006 22:52:24 -0000 1.11 *************** *** 3052,3055 **** --- 3052,3071 ---- } + // @pymethod HICON|PyCWnd|SetIcon|Calls the underlying MFC SetIcon method. + PyObject* ui_window_set_icon(PyObject* self, PyObject *args) + { + HICON hiconPrevIcon; + BOOL bBigIcon = TRUE; + if (!PyArg_ParseTuple(args, "ii:SetIcon", &hiconPrevIcon, &bBigIcon)) + return NULL; + CWnd *pWnd = GetWndPtr(self); + if (!pWnd) + return NULL; + GUI_BGN_SAVE; + HICON hiconRetVal = pWnd->SetIcon(hiconPrevIcon, bBigIcon); + GUI_END_SAVE; + return Py_BuildValue("i", hiconRetVal); + } + /////////////////////////////////////// // *************** *** 3158,3161 **** --- 3174,3178 ---- {"SetFocus", ui_window_set_focus, 1}, // @pymeth SetFocus|Sets focus to the window. {"SetFont", ui_window_set_font, 1}, // @pymeth SetFont|Sets the window's current font to the specified font. + {"SetIcon", ui_window_set_icon, 1}, // @pymeth SetIcon | Sets the handle to a specific icon. {"SetMenu", ui_window_set_menu, 1}, // @pymeth SetMenu|Sets the menu for a window. {"SetRedraw", ui_window_set_redraw, 1}, // @pymeth SetRedraw|Sets the redraw flag for the window. *************** *** 4139,4140 **** --- 4156,4159 ---- PyCMDIChildWnd_methods, GET_PY_CTOR(PyCMDIChildWnd)); + + |