Jump to content
  • Advertisement


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


Message loops 'n stuff

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

Hi, When I execute the following code a strange thing happens; The window appears and behaves as expected, however nothing is drawn, despite the window seeming to recieve and process windows messages. If the window looses focus the client rect exposes what appears to be the drawn surface! It reminds me of the time I forgot to set the parent property of a control... All source code can be found here

		public void q8Main()
			loadingform = new LoadingForm();
			Q8Window GameWindow = new Q8Window();
			// initialisation thread
			Thread InitialisationThread = new Thread(new ThreadStart(Initialise));
			InitialisationThread.Name = "Q8 Initialisation Thread";			
			// this will happily sit here waiting for the end

			// did we load our settings?
			if (!Loaded) return;

			// lets create a new window
			GameWindow = new Q8Window();
			GameWindow.Activated += new EventHandler(GameWindow_Activated);
			GameWindow.Closing += new System.ComponentModel.CancelEventHandler(GameWindow_Closing);
			GameWindow.Closed += new EventHandler(GameWindow_Closed);	

			engine.Console.Print("I have no idea why it won''t work straight up");
			engine.Console.Print("I guess I''ll find out soon enough");

			GameWindow.ClientSize = new Size(640, 480);

			engine.SetViewPort(640, 480);


				// guts goes here




		/// The main entry point for the application.
		static void Main() 
			q8 Game = new q8();
			// logic goes in a different thread
			Thread GameMainThread = new Thread(new ThreadStart(Game.q8Main));
			GameMainThread.Name = "Q8 Main Thread";

			Thread.CurrentThread.Name = "Main";

			// new message pump please



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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!