'LPARAM for EM_FINDTEXTEX:
typedef struct _findtextex {
CHARRANGE chrg;
LPCTSTR lpstrText;
CHARRANGE chrgText;} FINDTEXTEX;
typedef struct _charrange {
LONG cpMin;
LONG cpMax;} CHARRANGE;'

def FindText(self, flags, range, findText):

    findtextex_fmt = 'llPll'
    txt_buff = (findText + '\x00').encode(default_scintilla_encoding)
    txt_array = array.array('b', txt_buff)
    ft_buff = struct.pack(findtextex_fmt, range[0], range[1], txt_array.buffer_info()[0], 0, 0)
    ft_array = array.array('b', ft_buff)
    rc = self.SendScintilla(EM_FINDTEXTEX, flags, ft_array.buffer_info()[0])
    ftUnpacked = struct.unpack(findtextex_fmt, ft_array)
    return (rc, (ftUnpacked[3], ftUnpacked[4]))
