On Thursday, 17 Dec 2015 18:55:23 +0800, Dmitry Timoshkov wrote: > Hugh McMaster wrote: > >> - INT start,end; >> + unsigned short start, end; > > This can't work. In this case it does - but it is a technicality. MSDN says typedef unsigned short WORD; but I should have used unsigned int here, as we cast to WPARAM / UINT_PTR.