GetTextExtentPoint32 fails on Printer...
Posted on 1997-05-07
If I call hdc = CreateCompatibleDC(hPrinterDC), assuming the printerDC is valid, and then call GetTextExtentPoint(hdc,...), this call crashes the computer everytime. GetTextExtentPoint32 also crashes, but I need to know the size (height and width) of a string for size it will be on the printer. This code works fine for the screen when I am not printing.
What am I doing wrong?