What is a good FFT window function to reject DC?
If you're concerned with doing spectral analysis on a signal with a large DC component, and you want to suppress that DC peak, then a window function is not what you want. As some other answers noted, a highpass filter (or, viewed differently, a notch filter with the notch at zero frequency) is an appropriate solution.

To understand why, you need to think about what applying a window function does to the frequency response of each DFT output. The DFT is defined as:

$$
X[k] = \sum_{n=0}^{N-1} x[n] e^{\frac{-j2 \pi n k}{N}}
$$

One interpretation of how the DFT works is as a bank of filters at $N$ equally-spaced frequencies between $-\frac{f_s}{2}$ and $\frac{f_s}{2}$. Recast the sum above as follows:

$$
X[k] = \sum_{n=0}^{N-1} x_k[n]
$$

where:

$$
x_k[n] = x[n] e^{\frac{-j2 \pi n k}{N}}
$$

So, the $k$-th DFT output is generated by first taking the input signal $x[n]$ and multiplying it by a complex exponential at frequency $\frac{-2\pi k}{N}$ to yield a downconverted signal $x_k[n]$. The resulting signal is then summed over the $N$-sample window to yield the DFT output $X[k]$. This is effectively a moving average filter (sometimes called a boxcar filter), whose impulse response can be described as:

$$
b[n] = 
\begin{cases} 
1,\ x = 0, 1, \ldots , N-1 \\
0,\ \text{otherwise}
\end{cases}
$$

The magnitude response of the boxcar filter can be found by taking the discrete-time Fourier transform (DTFT) of that impulse response:

$$
|H(f)| = \left|\frac{\sin\left(N \pi\frac{f}{f_s}\right)}{\sin\left(\pi\frac{f}{f_s}\right)}\right|
$$

This is a Dirichlet kernel, and is sometimes referred to as a "periodic sinc" since it looks a bit like a sinc function but repeats periodically, which a sinc does not. This expression gives the magnitude response of each DFT output, where $f$ is measured as the frequency offset from the center frequency of the respective output bin. This illustrates the spectral leakage effect; each DFT output has a frequency response that covers some continuous swath of the input signal's spectrum, not just the discrete center frequency of each output.

Now consider how things change if you apply a window function to the input signal $x[n]$ before performing the DFT:

$$
\begin{align*}
X[k] &amp;= \sum_{n=0}^{N-1} w[n] x[n] e^{\frac{-j2 \pi n k}{N}} \\
&amp;= \sum_{n=0}^{N-1} w[n] x_k[n]
\end{align*}
$$

With the window function in place, the downconverted $x_k[n]$ is effectively passing through an FIR filter with an impulse response described by the window function. So, the per-output magnitude response of the DFT is:

$$
|H(f)| = |W(f)|
$$

where $W(f)$ the DTFT of the window function $w[n]$. Now note that if you chose a window function that had a zero at DC and used it to premultiply $x[n]$ before the DFT, you would actually cause the unintended effect of nulling out not only DC in the resulting spectrum, but the center frequencies of every one of the DFT outputs. This is probably not what you want.

So, if you truly just want to cancel the signal's DC component, removing it via some other type of pre-processing, not time-domain windowing, is the way to go. You could use a linear highpass filter with a very low cutoff frequency or subtract the estimated mean from the signal first, for example. Choosing between these methods should be based upon what other constraints your system has.