Jump to content
  • Advertisement


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


Problems after my game exits

This topic is 6382 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!