The TBM_GETPOS message retrieves the current logical position of the slider in a trackbar.
TBM_GETPOS wParam = 0; lParam = 0;
Returns a 32-bit value that specifies the current logical position of the trackbar’s slider. The logical positions are the integer values in the trackbar's range of minimum to maximum slider positions.