Original Post
I''m having some trouble with GDI and direct x. I use textout in my game to draw my text. I set up my HDC at startup, but all of the settings seem to be refreshed when I call my text function:
void text(int x, int y, char txt[])
{
lpddsback->GetDC(&textDC);
TextOut(textDC, x, y, txt, strlen(txt));
lpddsback->ReleaseDC(textDC);
}
However, if I add the hdc setup code to the text function it works fine. How can I keep the setting for the HDC from getting reset?