Sign in to follow this  

game message loop in plugin dll

Recommended Posts

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( );
// here draw

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

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