Problems after my game exits

Started by
1 comment, last by SikCiv 23 years, 3 months ago
Im using WinME and my game use to exit ok without a hitch, but ive changed many things, and added many ''hdc'' functions, now when my game closes, the arrow turns into a black square with a bit of stray pixels in it, and my games'' taskbar button doesnt disappear after exiting unless u click on it.. Im not sure what the problem is, so is there a way to check hdc problems without spending hundreds of dollars on a program like bounds checker? Surely there is a cheap alternative? I dont use MSDev, just the command line commands (nmake). here is my code... ---------------------------- HDC dc; lpDDSBack->GetDC(&dc); if(!dc) return; SetBKColor(dc, RGB(0,0,0)); SelectObject(dc, GetStockObject(WHITE_PEN)); SelectObject(dc, GetStockObject(BLACK_BRUSH)); rectangle(dc, rcDest.left, rcDest.....etc.. lpDDSBack->ReleaseDC(dc); --------------------------- In WinME do u have to close the app differently to Win95/98?

  Downloads:  ZeroOne Realm

Advertisement
Upload the files, I can see what happens on my machine (TNT2 Win2K), though I may not be able to diagnose the problem. It is probably a release problem of some kind (though that is just a wild guess, most problems are due to releasing stuff wrong, heh).


http://www.gdarchive.net/druidgames/
In case you''re not doing it - make sure to restore the hdc to how it was when you''re done with it:

// setting new brush
HBRUSH *OldBrush = SelectObject(hDC, GetStockObject(BLACK_BRUSH));

// restoring old brush
SelectObject(hDC, OldBrush);


Jim Adams

This topic is closed to new replies.

Advertisement