Hai folks,

the EM_EXSETSEL expects a CHARRANGE Structure in the lparam.
now i dont no how to use this EM_EXSETSEL with CHARRANGE in sendmessage.

this does not work, type mistmatch since the sendmessage() last para i have is long.

Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
Code:
    Dim cr As CharRange
    cr.cpMin = 0
    cr.cpMax = -1
    
    SendMessage wnd, EM_EXSETSEL, 0&, cr ' here cr is marked as type misedmatch.
pls kindly give the correct format.

pls help.