Archived

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

crazemanx

GDI and DirectX

Recommended Posts

I wrote myself a lovely set of macros to help with debugging, which wrote various useful informations to the screen using the GDI TextOut function. This works fine until i start double buffering, at which point the GDI continues to write only to the area of memory containing the original primary surface. Basically only one in two frames feature my nice GDI text. Is there a way to tell the GDI to write to the right part of memory, or alternatively does anyone know of an alternative way i could do this easily? (without using two monitors) Thanks NICK

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Aha! your suggestion set me thinking and i realised i was using:

hdc = GetDC(hwnd)
...
ReleaseDC(hwnd, hdc)

from Win32 rather than:

primarysurface->GetDC(&hdc)
...
primarysurface->ReleaseDC(hdc)

which solves my problem! I am happy now

thanx
Nick

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Just an idea, why not write to a file instead? That way in case of a crash you have an idea what has happened.

l8a

Share this post


Link to post
Share on other sites