[pywin32-checkins] pywin32/win32/src win32gui.i,1.96,1.97
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-01-05 05:33:16
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32594/win32/src Modified Files: win32gui.i Log Message: Return HBITMAPs as PyGdiHandles Fix stack allocation for NOTIFYICONDATA Remove a few more places where HANDLEs parsed as longs Various autoduck Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** win32gui.i 3 Jan 2007 04:20:41 -0000 1.96 --- win32gui.i 5 Jan 2007 05:33:13 -0000 1.97 *************** *** 142,146 **** } ! // @object PyGdiHANDLE|Gdi objects such as brush (HBRUSH), pen (HPEN), font (HFONT), region (HRGN) // On destruction, the handle is closed using DeleteObject. The object's Close() method also calls DeleteObject. // The gdi object should be deselected from any DC that it is selected into before it's closed. --- 142,146 ---- } ! // @object PyGdiHANDLE|Gdi objects such as brush (HBRUSH), pen (HPEN), font (HFONT), region (HRGN), bitmap (HBITMAP) // On destruction, the handle is closed using DeleteObject. The object's Close() method also calls DeleteObject. // The gdi object should be deselected from any DC that it is selected into before it's closed. *************** *** 172,176 **** // SWIG support for GDI handles. ! %typemap(python,except) HPEN, HBRUSH, HFONT, HRGN { Py_BEGIN_ALLOW_THREADS $function --- 172,176 ---- // SWIG support for GDI handles. ! %typemap(python,except) HPEN, HBRUSH, HFONT, HRGN, HBITMAP { Py_BEGIN_ALLOW_THREADS $function *************** *** 183,195 **** /* ??? If you don't map these to a known type, swig obstinately ignores the input and output typemaps and tries to treat them as pointers. However, it doesn't seem to matter what you typedef them to as long as they have in and out typemaps. ??? */ ! typedef float HPEN, HBRUSH, HFONT, HRGN; ! %typemap(python,out) HPEN, HBRUSH, HFONT, HRGN{ $target = PyWinObject_FromGdiHANDLE($source); } ! %typemap(python,in) HPEN, HBRUSH, HFONT, HRGN{ if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE)) return NULL; } ! %typemap(python,in) HRGN INPUT_NULLOK, HBRUSH INPUT_NULLOK{ if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, TRUE)) return NULL; --- 183,195 ---- /* ??? If you don't map these to a known type, swig obstinately ignores the input and output typemaps and tries to treat them as pointers. However, it doesn't seem to matter what you typedef them to as long as they have in and out typemaps. ??? */ ! typedef float HPEN, HBRUSH, HFONT, HRGN, HBITMAP; ! %typemap(python,out) HPEN, HBRUSH, HFONT, HRGN, HBITMAP{ $target = PyWinObject_FromGdiHANDLE($source); } ! %typemap(python,in) HPEN, HBRUSH, HFONT, HRGN, HBITMAP{ if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE)) return NULL; } ! %typemap(python,in) HRGN INPUT_NULLOK, HBRUSH INPUT_NULLOK, HBITMAP INPUT_NULLOK{ if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, TRUE)) return NULL; *************** *** 304,310 **** typedef long HICON - %apply HBITMAP {long}; - typedef long HBITMAP - %apply HGDIOBJ {long}; typedef long HGDIOBJ --- 304,307 ---- *************** *** 374,380 **** %typemap(python,in) MSG *INPUT { $target = (MSG *)_alloca(sizeof(MSG)); ! if (!PyArg_ParseTuple($source, "iiiii(ii):MSG param for $name", ! &$target->hwnd, &$target->message, &$target->wParam, --- 371,378 ---- %typemap(python,in) MSG *INPUT { + PyObject *obhwnd; $target = (MSG *)_alloca(sizeof(MSG)); ! if (!PyArg_ParseTuple($source, "Oiiii(ii):MSG param for $name", ! &obhwnd, &$target->message, &$target->wParam, *************** *** 382,388 **** &$target->time, &$target->pt.x, ! &$target->pt.y)) { return NULL; ! } } %typemap(python,ignore) RECT *OUTPUT(RECT rect_output) --- 380,387 ---- &$target->time, &$target->pt.x, ! &$target->pt.y)) return NULL; ! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&$target->hwnd, FALSE)) ! return NULL; } %typemap(python,ignore) RECT *OUTPUT(RECT rect_output) *************** *** 564,571 **** char *szReserved; int lenReserved; if (PyTuple_Check($source)) { if (!PyArg_ParseTuple($source, ! "ll(iiii)lls#", ! &ps_input.hdc, &ps_input.fErase, &ps_input.rcPaint.left, &ps_input.rcPaint.top, &ps_input.rcPaint.right, &ps_input.rcPaint.bottom, --- 563,571 ---- char *szReserved; int lenReserved; + PyObject *obdc; if (PyTuple_Check($source)) { if (!PyArg_ParseTuple($source, ! "Ol(iiii)lls#", ! &obdc, &ps_input.fErase, &ps_input.rcPaint.left, &ps_input.rcPaint.top, &ps_input.rcPaint.right, &ps_input.rcPaint.bottom, *************** *** 576,579 **** --- 576,581 ---- return NULL; } + if (!PyWinObject_AsHANDLE(obdc, (HANDLE *)&ps_input.hdc, FALSE)) + return NULL; if (lenReserved != sizeof(ps_input.rgbReserved)) return PyErr_Format(PyExc_ValueError, "%s: last element must be string of %d bytes", *************** *** 1299,1303 **** logger = NULL; // @pyparm object|logger||A logger object, generally from the standard logger package. ! if (!PyArg_ParseTuple(args, "O|set_logger", &logger)) return NULL; if (logger==Py_None) --- 1301,1305 ---- logger = NULL; // @pyparm object|logger||A logger object, generally from the standard logger package. ! if (!PyArg_ParseTuple(args, "O:set_logger", &logger)) return NULL; if (logger==Py_None) *************** *** 2014,2033 **** { /// XXX - todo - add support for a dialogproc! ! long hinst, hwnd, param=0; ! PyObject *obResId, *obDlgProc; ! BOOL bFreeString = FALSE; ! if (!PyArg_ParseTuple(args, "lOlO|l", &hinst, &obResId, &hwnd, &obDlgProc, ¶m)) return NULL; LPTSTR resid; ! if (PyInt_Check(obResId)) ! resid = (LPTSTR)MAKEINTRESOURCE(PyInt_AsLong(obResId)); ! else { if (!PyWinObject_AsTCHAR(obResId, &resid)) { PyErr_Clear(); ! PyErr_SetString(PyExc_TypeError, "Resource ID must be a string or int"); return NULL; } ! bFreeString = TRUE; ! } PyObject *obExtra = Py_BuildValue("Ol", obDlgProc, param); --- 2016,2049 ---- { /// XXX - todo - add support for a dialogproc! ! HINSTANCE hinst; ! HWND hwnd; ! LPARAM param=0; ! PyObject *obResId, *obDlgProc, *obhinst, *obhwnd; ! if (!PyArg_ParseTuple(args, "OOOO|l", ! &obhinst, // @pyparm <o PyHANDLE>|hInstance||Handle to module that contains the dialog template ! &obResId, // @pyparm str/int|TemplateName||Name or resource id of the dialog resource ! &obhwnd, // @pyparm <o PyHANDLE>|hWndParent||Handle to dialog's parent window ! &obDlgProc, // @pyparm function|DialogFunc||Dialog box procedure to process messages ! ¶m)) // @pyparm int|InitParam|0|Initialization data to be passed to above procedure during WM_INITDIALOG processing ! return NULL; ! if (!PyWinObject_AsHANDLE(obhinst, (HANDLE *)&hinst, FALSE)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE)) return NULL; LPTSTR resid; ! resid = (LPTSTR)PyLong_AsVoidPtr(obResId); ! if ((resid==NULL) && PyErr_Occurred()){ ! PyErr_Clear(); if (!PyWinObject_AsTCHAR(obResId, &resid)) { PyErr_Clear(); ! PyErr_SetString(PyExc_TypeError, "Resource ID must be a string or int in the range 0-65535"); return NULL; + } } ! else ! if (!IS_INTRESOURCE(resid)){ ! PyErr_SetString(PyExc_ValueError,"Int resource id must be in the range 0-65535"); ! return NULL; ! } PyObject *obExtra = Py_BuildValue("Ol", obDlgProc, param); *************** *** 2037,2041 **** Py_END_ALLOW_THREADS Py_DECREF(obExtra); ! if (bFreeString) PyWinObject_FreeTCHAR(resid); if (rc==-1) --- 2053,2057 ---- Py_END_ALLOW_THREADS Py_DECREF(obExtra); ! if (!IS_INTRESOURCE(resid)) PyWinObject_FreeTCHAR(resid); if (rc==-1) *************** *** 2056,2070 **** { /// XXX - todo - add support for a dialogproc! ! long hinst, hwnd, param=0; ! PyObject *obList, *obDlgProc; BOOL bFreeString = FALSE; - // @pyparm int|hinst|| - // @pyparm object|controlList|| - // @pyparm int|hwnd|| - // @pyparm object|dlgproc|| - // @pyparm int|param|0| - if (!PyArg_ParseTuple(args, "lOlO|l", &hinst, &obList, &hwnd, &obDlgProc, ¶m)) - return NULL; HGLOBAL h = MakeResourceFromDlgList(obList); if (h == NULL) --- 2072,2093 ---- { /// XXX - todo - add support for a dialogproc! ! HINSTANCE hinst; ! HWND hwnd; ! LPARAM param=0; ! PyObject *obhinst, *obhwnd, *obList, *obDlgProc; BOOL bFreeString = FALSE; + if (!PyArg_ParseTuple(args, "OOOO|l", + &obhinst, // @pyparm <o PyHANDLE>|hInstance||Handle to module creating the dialog box + &obList, // @pyparm list|controlList||List containing a <o Dialog Header Tuple>, followed by variable number of <o Dialog Item Tuple>s + &obhwnd, // @pyparm <o PyHANDLE>|hWndParent||Handle to dialog's parent window + &obDlgProc, // @pyparm function|DialogFunc||Dialog box procedure to process messages + ¶m)) // @pyparm int|InitParam|0|Initialization data to be passed to above procedure during WM_INITDIALOG processing + return NULL; + if (!PyWinObject_AsHANDLE(obhinst, (HANDLE *)&hinst, FALSE)) + return NULL; + if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE)) + return NULL; + HGLOBAL h = MakeResourceFromDlgList(obList); if (h == NULL) *************** *** 2097,2111 **** { /// XXX - todo - add support for a dialogproc! ! long hinst, hwnd, param=0; ! PyObject *obList, *obDlgProc; BOOL bFreeString = FALSE; ! // @pyparm int|hinst|| ! // @pyparm object|controlList|| ! // @pyparm int|hwnd|| ! // @pyparm object|dlgproc|| ! // @pyparm int|param|0| ! if (!PyArg_ParseTuple(args, "lOlO|l", &hinst, &obList, &hwnd, &obDlgProc, ¶m)) return NULL; ! HGLOBAL h = MakeResourceFromDlgList(obList); if (h == NULL) --- 2120,2140 ---- { /// XXX - todo - add support for a dialogproc! ! HINSTANCE hinst; ! HWND hwnd; ! LPARAM param=0; ! PyObject *obhinst, *obhwnd, *obList, *obDlgProc; BOOL bFreeString = FALSE; ! if (!PyArg_ParseTuple(args, "OOOO|l", ! &obhinst, // @pyparm <o PyHANDLE>|hInstance||Handle to module creating the dialog box ! &obList, // @pyparm list|controlList||List containing a <o Dialog Header Tuple>, followed by variable number of <o Dialog Item Tuple>s ! &obhwnd, // @pyparm <o PyHANDLE>|hWndParent||Handle to dialog's parent window ! &obDlgProc, // @pyparm function|DialogFunc||Dialog box procedure to process messages ! ¶m)) // @pyparm int|InitParam|0|Initialization data to be passed to above procedure during WM_INITDIALOG processing return NULL; ! if (!PyWinObject_AsHANDLE(obhinst, (HANDLE *)&hinst, FALSE)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE)) ! return NULL; ! HGLOBAL h = MakeResourceFromDlgList(obList); if (h == NULL) *************** *** 2609,2613 **** &src_x, // @pyparm int|XSrc||X pos of src rect &src_y, // @pyparm int|YSrc||Y pos of src rect ! &obmask, // @pyparm <o PyHANDLE>|Mask||Handle to monochrome bitmap used to mask color &mask_x, // @pyparm int|xMask||X pos in mask &mask_y, // @pyparm int|yMask||Y pos in mask --- 2638,2642 ---- &src_x, // @pyparm int|XSrc||X pos of src rect &src_y, // @pyparm int|YSrc||Y pos of src rect ! &obmask, // @pyparm <o PyGdiHANDLE>|Mask||Handle to monochrome bitmap used to mask color &mask_x, // @pyparm int|xMask||X pos in mask &mask_y, // @pyparm int|yMask||Y pos in mask *************** *** 2673,2678 **** // @rdesc Returns the index of the first new image if successful, or -1 otherwise. int ImageList_Add(HIMAGELIST himl, // @pyparm int|himl||Handle to the image list. ! HBITMAP hbmImage, // @pyparm int|hbmImage||Handle to the bitmap that contains the image or images. The number of images is inferred from the width of the bitmap. ! HBITMAP hbmMask); // @pyparm int|hbmMask||Handle to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored --- 2702,2707 ---- // @rdesc Returns the index of the first new image if successful, or -1 otherwise. int ImageList_Add(HIMAGELIST himl, // @pyparm int|himl||Handle to the image list. ! HBITMAP hbmImage, // @pyparm <o PyGdiHANDLE>|hbmImage||Handle to the bitmap that contains the image or images. The number of images is inferred from the width of the bitmap. ! HBITMAP hbmMask); // @pyparm <o PyGdiHANDLE>|hbmMask||Handle to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored *************** *** 2900,2904 **** ); ! // @pyswig HBITMAP|CreateCompatibleBitmap|Creates a bitmap compatible with the device that is associated with the specified device context. HBITMAP CreateCompatibleBitmap( HDC hdc, // @pyparm int|hdc||handle to DC --- 2929,2933 ---- ); ! // @pyswig <o PyGdiHANDLE>|CreateCompatibleBitmap|Creates a bitmap compatible with the device that is associated with the specified device context. HBITMAP CreateCompatibleBitmap( HDC hdc, // @pyparm int|hdc||handle to DC *************** *** 2907,2911 **** ); ! // @pyswig HBITMAP|CreateBitmap|Creates a bitmap HBITMAP CreateBitmap( int nWidth, // @pyparm int|width||bitmap width, in pixels --- 2936,2940 ---- ); ! // @pyswig <o PyGdiHANDLE>|CreateBitmap|Creates a bitmap HBITMAP CreateBitmap( int nWidth, // @pyparm int|width||bitmap width, in pixels *************** *** 3234,3241 **** { PyObject *obTip=NULL; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! if (!PyArg_ParseTuple(ob, "l|iiilO:NOTIFYICONDATA tuple", &pnid->hWnd, &pnid->uID, &pnid->uFlags, &pnid->uCallbackMessage, &pnid->hIcon, &obTip)) return FALSE; if (obTip) { TCHAR *szTip; --- 3263,3275 ---- { PyObject *obTip=NULL; + PyObject *obhwnd, *obhicon=Py_None; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! if (!PyArg_ParseTuple(ob, "O|iiiOO:NOTIFYICONDATA tuple", &obhwnd, &pnid->uID, &pnid->uFlags, &pnid->uCallbackMessage, &obhicon, &obTip)) return FALSE; + if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&pnid->hWnd, FALSE)) + return NULL; + if (!PyWinObject_AsHANDLE(obhicon, (HANDLE *)&pnid->hIcon, TRUE)) + return NULL; if (obTip) { TCHAR *szTip; *************** *** 3251,3262 **** { PyObject *obTip=NULL, *obInfo=NULL, *obInfoTitle=NULL; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! if (!PyArg_ParseTuple(ob, "l|iiilOOiOi:NOTIFYICONDATA tuple", ! &pnid->hWnd, &pnid->uID, &pnid->uFlags, ! &pnid->uCallbackMessage, &pnid->hIcon, &obTip, ! &obInfo, &pnid->uTimeout, &obInfoTitle, ! &pnid->dwInfoFlags)) return FALSE; if (obTip) { TCHAR *szTip; --- 3285,3309 ---- { PyObject *obTip=NULL, *obInfo=NULL, *obInfoTitle=NULL; + PyObject *obhwnd, *obhicon=Py_None; memset(pnid, 0, sizeof(*pnid)); pnid->cbSize = sizeof(*pnid); ! // @object PyNOTIFYICONDATA|Tuple used to fill a NOTIFYICONDATA struct as used with <om win32gui.Shell_NotifyIcon> ! // @pyseeapi NOTIFYICONDATA ! if (!PyArg_ParseTuple(ob, "O|iiiOOOiOi:NOTIFYICONDATA tuple", ! &obhwnd, // @tupleitem 0|<o PyHANDLE>|hWnd|Handle to window that will process icon's messages ! &pnid->uID, // @tupleitem 1|int|ID|Unique id used when hWnd processes messages from more than one icon ! &pnid->uFlags, // @tupleitem 2|int|Flags|Combination of win32gui.NIF_* flags ! &pnid->uCallbackMessage, // @tupleitem 3|int|CallbackMessage|Message id to be pass to hWnd when processing messages ! &obhicon, // @tupleitem 4|<o PyHANDLE>|hIcon|Handle to the icon to be displayed ! &obTip, // @tupleitem 5|str|Tip|Tooltip text (optional) ! &obInfo, // @tupleitem 6|str|Info|Balloon tooltip text (optional) ! &pnid->uTimeout, // @tupleitem 7|int|Timeout|Timeout for balloon tooltip, in milliseconds (optional) ! &obInfoTitle, // @tupleitem 8|str|InfoTitle|Title for balloon tooltip (optional) ! &pnid->dwInfoFlags)) // @tupleitem 9|int|InfoFlags|Combination of win32gui.NIIF_* flags (optional) return FALSE; + if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&pnid->hWnd, FALSE)) + return NULL; + if (!PyWinObject_AsHANDLE(obhicon, (HANDLE *)&pnid->hIcon, TRUE)) + return NULL; if (obTip) { TCHAR *szTip; *************** *** 3290,3302 **** #ifndef MS_WINCE #define NIF_INFO NIF_INFO #define NIIF_WARNING NIIF_WARNING #define NIIF_ERROR NIIF_ERROR #define NIIF_NONE NIIF_NONE #define NIIF_INFO NIIF_INFO #endif #define NIM_ADD NIM_ADD // Adds an icon to the status area. #define NIM_DELETE NIM_DELETE // Deletes an icon from the status area. ! #define NIM_MODIFY NIM_MODIFY // Modifies an icon in the status area. #ifdef NIM_SETFOCUS #define NIM_SETFOCUS NIM_SETFOCUS // Give the icon focus. --- 3337,3355 ---- #ifndef MS_WINCE #define NIF_INFO NIF_INFO + #define NIF_STATE NIF_STATE + // #define NIF_GUID NIF_GUID #define NIIF_WARNING NIIF_WARNING #define NIIF_ERROR NIIF_ERROR #define NIIF_NONE NIIF_NONE #define NIIF_INFO NIIF_INFO + // #define NIIF_USER NIIF_USER + #define NIIF_ICON_MASK NIIF_ICON_MASK + #define NIIF_NOSOUND NIIF_NOSOUND #endif #define NIM_ADD NIM_ADD // Adds an icon to the status area. #define NIM_DELETE NIM_DELETE // Deletes an icon from the status area. ! #define NIM_MODIFY NIM_MODIFY // Modifies an icon in the status area. ! #define NIM_SETVERSION NIM_SETVERSION #ifdef NIM_SETFOCUS #define NIM_SETFOCUS NIM_SETFOCUS // Give the icon focus. *************** *** 3307,3316 **** return NULL; } ! %typemap(python,arginit) NOTIFYICONDATA *{ ! NOTIFYICONDATA nid; $target = &nid; } ! // @pyswig |Shell_NotifyIcon|Adds, removes or modifies a taskbar icon, ! BOOLAPI Shell_NotifyIcon(DWORD dwMessage, NOTIFYICONDATA *pnid); #ifdef MS_WINCE --- 3360,3372 ---- return NULL; } ! %typemap(python,arginit) NOTIFYICONDATA *(NOTIFYICONDATA nid){ ! ZeroMemory(&nid, sizeof(nid)); $target = &nid; } ! ! // @pyswig |Shell_NotifyIcon|Adds, removes or modifies a taskbar icon. ! BOOLAPI Shell_NotifyIcon( ! DWORD dwMessage, // @pyparm int|Message||One of win32gui.NIM_* flags ! NOTIFYICONDATA *pnid); // @pyparm <o PyNOTIFYICONDATA>|nid||Tuple containing NOTIFYICONDATA info #ifdef MS_WINCE *************** *** 4451,4456 **** UINT uPosition, // @pyparm int|uPosition||menu item UINT uFlags, // @pyparm int|uFlags||options ! HBITMAP hBitmapUnchecked, // @pyparm int|hBitmapUnchecked||handle to unchecked bitmap ! HBITMAP hBitmapChecked // @pyparm int|hBitmapChecked||handle to checked bitmap ); #endif /* not MS_WINCE */ --- 4507,4512 ---- UINT uPosition, // @pyparm int|uPosition||menu item UINT uFlags, // @pyparm int|uFlags||options ! HBITMAP INPUT_NULLOK, // @pyparm <o PyGdiHANDLE>|hBitmapUnchecked||handle to unchecked bitmap, can be None ! HBITMAP INPUT_NULLOK // @pyparm <o PyGdiHANDLE>|hBitmapChecked||handle to checked bitmap, can be None ); #endif /* not MS_WINCE */ *************** *** 4902,4906 **** &width, // @pyparm int|Width||Width of source rectangle &height, // @pyparm int|Height||Height of source rectangle ! &obmask, // @pyparm <o PyHANDLE>|Mask|None|Handle to monochrome bitmap to mask source &xmask, // @pyparm int|xMask|0|x pos in mask &ymask)) // @pyparm int|yMask|0|y pos in mask --- 4958,4962 ---- &width, // @pyparm int|Width||Width of source rectangle &height, // @pyparm int|Height||Height of source rectangle ! &obmask, // @pyparm <o PyGdiHANDLE>|Mask|None|Handle to monochrome bitmap to mask source, can be None &xmask, // @pyparm int|xMask|0|x pos in mask &ymask)) // @pyparm int|yMask|0|y pos in mask *************** *** 5150,5154 **** // @pyswig <o PyGdiHANDLE>|CreatePatternBrush|Creates a brush using a bitmap as a pattern HBRUSH CreatePatternBrush( ! HBITMAP hbmp); // @pyparm <o PyHANDLE>|hbmp||Handle to a bitmap // @pyswig <o PyGdiHANDLE>|CreateHatchBrush|Creates a hatch brush with specified style and color --- 5206,5210 ---- // @pyswig <o PyGdiHANDLE>|CreatePatternBrush|Creates a brush using a bitmap as a pattern HBRUSH CreatePatternBrush( ! HBITMAP hbmp); // @pyparm <o PyGdiHANDLE>|hbmp||Handle to a bitmap // @pyswig <o PyGdiHANDLE>|CreateHatchBrush|Creates a hatch brush with specified style and color *************** *** 5478,5482 **** BOOLAPI CreateCaret( HWND hWnd, // @pyparm int|hWnd||handle to owner window ! HBITMAP hBitmap, // @pyparm int|hBitmap||handle to bitmap for caret shape int nWidth, // @pyparm int|nWidth||caret width int nHeight // @pyparm int|nHeight||caret height --- 5534,5538 ---- BOOLAPI CreateCaret( HWND hWnd, // @pyparm int|hWnd||handle to owner window ! HBITMAP hBitmap, // @pyparm <o PyGdiHANDLE>|hBitmap||handle to bitmap for caret shape int nWidth, // @pyparm int|nWidth||caret width int nHeight // @pyparm int|nHeight||caret height |