开发者

How to see output of TextOutW(...) after each call?

On writing to the display with:

::TextOutW( pDC->m_hDC, x, y, &Out, 1 );

It only shows on the screen after every 15 calls (15 characters). For debugging purposes only, I would like to see the new character on the display after each call. I have 开发者_运维技巧tried ::flushall() and a few other things but no change. TIA


GDI function calls are accumulated and called in batches for performance reasons. You can call GdiFlush after the TextOut call to perform the drawing immediately. Alternatively, call GdiSetBatchLimit(1) before outputting the text to disable batching completely.


::flushall() is for iostreams, so it won't affect Windows screen output at all. I've never tried it, but based on the docs, I believe GDIFlush() might be what you want. You should also be able to use GDISetBatchLimit(1); to force each call to run immediately upon being called.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜