Init cursor to IDC_ARROW at beginning of RegisterClass(), not set it every WM_SETCURSOR message, otherwise it makes the cursor can't be changed into other shapes.