Regarding the 1024 "time steps" in your question, that is simply the number of samples that are taken from the time-domain signal.
As to how the 1024 time-domain samples influence the FFT, this involves the sampling frequency that was used to obtain the samples.
Sampling frequency is typically chosen to conform with the Nyquist-Shannon sampling theorem, which basically states that you must sample the time-domain signal at a frequency higher than "2F" if you want to resolve a frequency "F" via the FFT.
As for the Hann (Hanning) and Triangular window codes, they are as follows:
Hann window:
for( i=0; i<bufLen; i++ )
window[i] = 0.5 * ( 1 - cos( 2 * PI * i / (bufLen-1) ) )
Triangular window:
for( i=0; i<bufLen; i++ )
window[i] = 2/bufLen * ( (bufLen)/2 - abs( i-((bufLen-1)/2) ) )
...
The plot below is the frequency response of the Triangular window, in dB magnitude.
![Triangular Window Function dB magnitude](https://i.stack.imgur.com/haxGL.jpg)
The plot below is the frequency response of the Triangular window, but now in linear magnitude.
![Triangular Window Function linear magnitude](https://i.stack.imgur.com/a4boW.jpg)
You can plot the Hann, Triangular, and many other window functions here: Plot windows functions