So what's the problem? When the DT_CALCRECT flag is passed, the function ISN'T supposed to actually draw the text. It's supposed to er, calculate the rect that will be needed to display it in - hence the cryptic name of the flag - DT_CALCRECT.
The answer is all in the documentation, I'd suggest you take a closer look:
Draw Text function(windows)[
^]