Re: win32lib: manipulating vWinMainState

new topic     » goto parent     » topic index » view thread      » older message » newer message

Alexander Toresson wrote:
> 
> Derek Parnell wrote:
>   <snip>
> > <---test.exw--->
> > without warning
> > include win32lib.ew
> > include other.ew
> > WinMain(0, 0)    
> > <---end of file--->
> 
> Hmm. My example wasn't good enough. I'll try to explain again.
> This method would work perfectly when the main program uses win32lib
> and calls WinMain(). But, I want it to work without the main program
> using win32lib, for example with an opengl library.

Why do you need win32lib then?

>     The tracer should of course run in the background, and therefore
> it cannot call WinMain(). That would stop the main program.

So as I understand it now, the situation is this...

One has a Windows program, not necessarily using Win32lib, and one wants
to use your tracer library - which DOES use Win32lib. The main program will
use its own Windows message loop and your tracer stuff will use Win32lib's
Windows message loop. 

I don't know how to code a Windows program that uses multiple Windows 
message loops. I don't see how you can run two GetMsg(), TranslateMsg(),
DispatchMsg() loops? Maybe someone else can help us here.

> The problem
> is that vWinMainState hasn't been set to kStarted if I haven't called
> WinMain(), and therefore my window don't receive events.

Calling WinMain(0,0) is equivalent to ...

   vWinMainState = kStarted
   call_proc(r_eventLoop, {vELUserData})
   releaseAllResources(0)


> Maybe vWinMainState should be set to kStarted in openWindow()?

Maybe you can modify your copy of Win32lib to do that.
 
-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu