Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


game message loop in plugin dll


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Milla.M   Members   -  Reputation: 125

Like
0Likes
Like

Posted 13 June 2012 - 12:45 AM

Hi
I am developing plugin dll for thirdparty application. I want to do simple animation from my plugin dll, only when there is not messages in the main application i.e when the application is idle. The standrad way of doing this is :

while ( bDoingBackgroundProcessing )
{
	MSG msg;
	while ( ::PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
	{
		if ( !PumpMessage( ) )
		{
			bDoingBackgroundProcessing = FALSE;
			::PostQuitMessage( );
			break;
		}
	}
// here draw  
DrawScene();
}

But since I want to do the drawing from dll plugin, I can not this, i.e I can not modify the host application main message loop.

I already tried to put nested message loop in my dll, and it works with some problems, like some messages from the main application are not processed at all.

Anyone have suggestion how to solve this ?

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS