Jump to content
  • Advertisement


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


this problem is my nemesis. alt-tab

This topic is 5290 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

You can tab out of my program, but you cannot tab in. I get a "This program is not responding" message when I try to right-click exit it on the taskbar...otherwise I can''t alt-tab back in, I can''t get back in by clicking on its taskbar button, nothing. It''d dead and done once I''ve tabbed out. Here''s my WinMain:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreviousInstance, LPSTR lpcmdline, int nCmdShow)

	MSG Message;
	while (g_App.GetProgramStatus())
		if (PeekMessage(&Message, g_App.GetWindowHandle(), 0, 0, PM_REMOVE))

		//    G  A  M  E       L  O  G  I  C

		if (g_App.GetWindowStatus())

	} // end window while

	return 0;
} // end WinMain

And here''s what I think to be the relevant entry in my message handler:

	switch (LOWORD(wparam))
		case WA_ACTIVE:
				if ((HWND)lparam==g_App.GetWindowHandle())

			} break;

			} break;

	} // switch (LOWORD(wparam))

} break;

case WM_PAINT:

	// start painting

	hdc = BeginPaint(hWindow,&ps);

	// even though this serves no purpose, windows gets anxiety attacks if you

	// try to respond to this message without actually "using" its own painting routines.

	// windows anxiety attacks are quite bad for your program, you know.

	// end painting


	g_App.DDRestoreSurfaces(); // just calls IDirectDraw7::RestoreAllSurfaces if IDirectDraw7::IsLost returns true.

} break;
I''m using DirectDraw7, and other than alt-tabbing the game runs fine for what it is. If anyone has any incite please clue me in. I really appreciate everyone''s help.

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!