Archived

This topic is now archived and is closed to further replies.

da_cobra

text flickers

Recommended Posts

when I try to display a text in my DX-screen (within my game-loop) it flickers I use the following function : void PrintText(char *text, int bR, int bG, int bB, int tR, int tG, int tB) { if (G.lpDDSPrimary->GetDC(&G.hdc) == DD_OK) { SetBkColor(G.hdc, RGB(bR, bG, bB)); SetTextColor(G.hdc, RGB(tR, tG, tB)); TextOut(G.hdc, 0, 0, text, lstrlen(text)); G.lpDDSPrimary->ReleaseDC(G.hdc); } } did I mis something or isn''t this the right way to display text in a dx-screen (I don''t use a steady framerate) thanx in advance for any replies

Share this post


Link to post
Share on other sites
I had the same problem some time ago. Here''s the way I solved it: I moved all project files of the current DirectX project to the "C:\Recycled" folder and then formatted the whole hard disk. I re-installed Windows and then moved the files back from the "C:\Recycled" folder. It worked then perfectly. I heard, it is a time-critical installation-bug (TCIB). There was another solution on MSDN, I don''t know where.

Kneelz

PS: Your code looks right to me. IT CAN''T BE WRONG.

Share this post


Link to post
Share on other sites