Sign in to follow this  

game message loop in plugin dll

This topic is 2012 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
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 :

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

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 ?

Share this post


Link to post
Share on other sites

This topic is 2012 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this