Re: Win32Lib; Timed events

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

CChris wrote:
> 
> ZNorQ wrote:
> > 
> > CChris wrote:
> > > 
> > > I said "any control will do". 0 is not an actual control id, not even a
> > > valid
> > > handle for Windows. It is a special value which is treated, somewhat
> > > consistently,
> > > as if refeerring to the desktop window. But it actually doesn't.
> > > 
> > > CChris
> > 
> > Ah, ok. But how would i go about then when I'm creating a program that
> > doesn't
> > pop-up a window. I know I can use WinMain(0, Normal), but how do I use the
> > timer
> > in this case?
> > 
> > Purpose of the code; Run in the background and run various code in
> > intervals.
> > 
> > Kenneth/ZNorQ
> 
> CreateEx a main window that is not visible and has the WS_EX_NOACTIVATE
> extended
> style (so it won't show in the toolbar). Then WinMain(the_window,Minimized).
> This is probably close to what you want.
> A cleaner way woul be to support message only windows, but it would work on
> Win2K only, and currently requires low level API to create it. I'll think
> about
> it.
> 
> CChris

I just tried something else before I saw your answer; (VERY abbreviated)

mywin= createEx(window, etc...)
setTimer(mywin, 1, 1000)
setHandler(mywin, etc...)
WinMain(0,Normal)

And it *seems* to work! I'll have a go at your version as well. 

As for "message only windows", I'm not that fluent in WinAPI coding to even
remotely understand what your are talking about.. :)

Thanks for the input, CChris.

ZNorQ

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

Search



Quick Links

User menu

Not signed in.

Misc Menu