Before you can peek at a window message, you must first begin intercepting it, e.g.:
Code:
reaper.JS_WindowMessage_Intercept(cur_view,"WM_LBUTTONDOWN", true)
If no message of type "WM_LBUTTONDOWN" has been intercepted yet, the return time and params will be 0.