Discrete and Continuous Signals
Your understanding is correct and you can apply Hann windowing on discrete signals. The choice of your window depends on how easily you can visually resolve two sinusoids that are closely spaced in the spectrogram. $$STFT = X(m,\omega) = \sum_{n=-\infty}^{n=+\infty}x_nw_{n-mL}e^{-j\omega n}, $$ where $L$ is the step size of spectrogram (interval after which you place next window). and $W$ is the size of window, which decides resolution of frequency (row-wise separation of frequencies). Higher the $W$, more finer the resolution. You can see there is overlap between adjacent windows, the overlap being $W-L$.