1. Win32Lib; Timed events

I have a couple of questions in regards to timed events in Win32Lib;

a) Why wont this code example work? (PS! The mbox is just another form of
message_box,
and it works - this isn't the problem.)

procedure evnTIM_Timer (integer hControl, integer hEvent, sequence uParameters)
  mbox("5 seconds just passed...")
end procedure
setTimer(fmMAF, 12, 5000)
setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))

b) Is it possible to create timers that aren't 'linked' to a window?

Kenneth/ZNorQ

new topic     » topic index » view message » categorize

2. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> 
> I have a couple of questions in regards to timed events in Win32Lib;
> 
> a) Why wont this code example work? (PS! The mbox is just another form of
> message_box,
> and it works - this isn't the problem.)
> 
> procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> uParameters)
>   mbox("5 seconds just passed...")
> end procedure
> setTimer(fmMAF, 12, 5000)
> setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))
> 
> b) Is it possible to create timers that aren't 'linked' to a window?
> 
> Kenneth/ZNorQ

Of course. Any control will accept a timer AFAIK.

As to why the message box doesn't show up: try replacing it with a showMessage()
statement, and see if you "get the message". I use this for debugging things
where the inspected window must not lose focus to the debugger, so it definitely
works.

CChris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32Lib; Timed events

CChris wrote:
> 
> ZNorQ wrote:
> > 
> > 
> > I have a couple of questions in regards to timed events in Win32Lib;
> > 
> > a) Why wont this code example work? (PS! The mbox is just another form of
> > message_box,
> > and it works - this isn't the problem.)
> > 
> > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> > uParameters)
> >   mbox("5 seconds just passed...")
> > end procedure
> > setTimer(fmMAF, 12, 5000)
> > setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))
> > 
> > b) Is it possible to create timers that aren't 'linked' to a window?
> > 
> > Kenneth/ZNorQ
> 
> Of course. Any control will accept a timer AFAIK.
> 
> As to why the message box doesn't show up: try replacing it with a
> showMessage()
> statement, and see if you "get the message". I use this for debugging things
> where the inspected window must not lose focus to the debugger, so it
> definitely
> works.
> 
> CChris

It works now, not because I used the showMessage (I did, but that didn't change
anything), but because I changed from timer ID 12 to 1... So, I guess you can't
have 12 timers? (I don't have 12 timers, 12 was just a random number I picked for
my routine..)

Thank for the feedback, though.. :)

Kenneth/ZNorQ

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32Lib; Timed events

Hmmm, linking the timer to a window seems to work, but when I try creating timer
that isn't connected to any controls (using zero instead of a control), it no
longer works, it seems..

procedure evnTIM_TimerX (integer hControl, integer hEvent, sequence uParameters)
  --
  setText({sbMAF, 1}, "5 seconds passed..")
  --
end procedure
setTimer(0, 1, 5000)
setHandler(1, w32HTimer, routine_id("evnTIM_TimerX"))

I had to change from showMessage to setText...

Kenneth/ZNorQ

new topic     » goto parent     » topic index » view message » categorize

5. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> CChris wrote:
> > 
> > ZNorQ wrote:
> > > 
> > > 
> > > I have a couple of questions in regards to timed events in Win32Lib;
> > > 
> > > a) Why wont this code example work? (PS! The mbox is just another form of
> > > message_box,
> > > and it works - this isn't the problem.)
> > > 
> > > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> > > uParameters)
> > >   mbox("5 seconds just passed...")
> > > end procedure
> > > setTimer(fmMAF, 12, 5000)
> > > setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))
> > > 
> > > b) Is it possible to create timers that aren't 'linked' to a window?
> > > 
> > > Kenneth/ZNorQ
> > 
> > Of course. Any control will accept a timer AFAIK.
> > 
> > As to why the message box doesn't show up: try replacing it with a
> > showMessage()
> > statement, and see if you "get the message". I use this for debugging things
> > where the inspected window must not lose focus to the debugger, so it
> > definitely
> > works.
> > 
> > CChris
> 
> It works now, not because I used the showMessage (I did, but that didn't
> change
> anything), but because I changed from timer ID 12 to 1... So, I guess you
> can't
> have 12 timers? (I don't have 12 timers, 12 was just a random number I picked
> for my routine..)
> 
> Thank for the feedback, though.. :)
> 
> Kenneth/ZNorQ

I just ran this:
include win32lib.ew

constant w=create(Window,"eee",0,50,50,50,50,0)
procedure p(integer id,integer event,sequence s)
w32VOID=message_box("5 seconds just passed...","Test passed",MB_OK)
end procedure
setHandler(w,w32HTimer,routine_id("p"))
setTimer(w,12,5000)
WinMain(w,Normal)


and it just works. Message boxes pile up 12 a minute, and each one closes on Ok.

CChris

new topic     » goto parent     » topic index » view message » categorize

6. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> Hmmm, linking the timer to a window seems to work, but when I try creating
> timer
> that isn't connected to any controls (using zero instead of a control), it no
> longer works, it seems..
> 
> procedure evnTIM_TimerX (integer hControl, integer hEvent, sequence
> uParameters)
>   --
>   setText({sbMAF, 1}, "5 seconds passed..")
>   --
> end procedure
> setTimer(0, 1, 5000)
> setHandler(1, w32HTimer, routine_id("evnTIM_TimerX"))
> 
> I had to change from showMessage to setText...
> 
> Kenneth/ZNorQ

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Win32Lib; Timed events

CChris wrote:
> 
> ZNorQ wrote:
> > 
> > CChris wrote:
> > > 
> > > ZNorQ wrote:
> > > > 
> > > > 
> > > > I have a couple of questions in regards to timed events in Win32Lib;
> > > > 
> > > > a) Why wont this code example work? (PS! The mbox is just another form
> > > > of
> message_box,</font></i>
> > > > and it works - this isn't the problem.)
> > > > 
> > > > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> > > > uParameters)
> > > >   mbox("5 seconds just passed...")
> > > > end procedure
> > > > setTimer(fmMAF, 12, 5000)
> > > > setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))
> > > > 
> > > > b) Is it possible to create timers that aren't 'linked' to a window?
> > > > 
> > > > Kenneth/ZNorQ
> > > 
> > > Of course. Any control will accept a timer AFAIK.
> > > 
> > > As to why the message box doesn't show up: try replacing it with a
> > > showMessage()
> > > statement, and see if you "get the message". I use this for debugging
> > > things
> > > where the inspected window must not lose focus to the debugger, so it
> > > definitely
> > > works.
> > > 
> > > CChris
> > 
> > It works now, not because I used the showMessage (I did, but that didn't
> > change
> > anything), but because I changed from timer ID 12 to 1... So, I guess you
> > can't
> > have 12 timers? (I don't have 12 timers, 12 was just a random number I
> > picked
> > for my routine..)
> > 
> > Thank for the feedback, though.. :)
> > 
> > Kenneth/ZNorQ
> 
> I just ran this:
> }}}
<eucode>
> include win32lib.ew
> 
> constant w=create(Window,"eee",0,50,50,50,50,0)
> procedure p(integer id,integer event,sequence s)
> w32VOID=message_box("5 seconds just passed...","Test passed",MB_OK)
> end procedure
> setHandler(w,w32HTimer,routine_id("p"))
> setTimer(w,12,5000)
> WinMain(w,Normal)
> </eucode>
{{{

> 
> and it just works. Message boxes pile up 12 a minute, and each one closes on
> Ok.
> 
> CChris

Aaah, know what I did wrong. In the setHandler I used same ID as used as TIMER
ID in setTimer.

In other words - it worked! :) Thanks man.

Kenneth/ZNorQ

new topic     » goto parent     » topic index » view message » categorize

8. Re: Win32Lib; Timed events

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: Win32Lib; Timed events

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

new topic     » goto parent     » topic index » view message » categorize

10. Re: Win32Lib; Timed events

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 message » categorize

11. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> 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

Other Windows developers had needed a window that would just take and dispatch
messages, and nothing else (no switching to it, no taskbar button, no rectagle on
screen, no nothing).

You can always do this by defining the event loop of the window
accordingly.That's how it was done under Win9x. A good recipe for bugs. You can
do that using win32lib's setDefaultProcessing().

So, in Win2K and onwards, there is a special sort of window with such a
minimalistic functionality, which is called "message only window". win32lib
cannot currently createEx() it, but the Windows API sure can (if curious, google
for HWND_MESSAGE and check links to MSDN in the result).


CChris

new topic     » goto parent     » topic index » view message » categorize

12. Re: Win32Lib; Timed events

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

You can use HWND GetDesktopWindow(VOID) to get a handle to desktop

window which is in most cases always available and use that with your timer.

Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » goto parent     » topic index » view message » categorize

13. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> CChris wrote:
> > 
> > ZNorQ wrote:
> > > 
> > > 
> > > I have a couple of questions in regards to timed events in Win32Lib;
> > > 
> > > a) Why wont this code example work? (PS! The mbox is just another form of
> > > message_box,
> > > and it works - this isn't the problem.)
> > > 
> > > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> > > uParameters)
> > >   mbox("5 seconds just passed...")
> > > end procedure
> > > setTimer(fmMAF, 12, 5000)
> > > setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))

> It works now, not because I used the showMessage (I did, but that didn't
> change
> anything), but because I changed from timer ID 12 to 1... So, I guess you
> can't
> have 12 timers? (I don't have 12 timers, 12 was just a random number I picked
> for my routine..)
> 
> Thank for the feedback, though.. :)
> 
> Kenneth/ZNorQ

It works now, not because you picked a lower number.  
setHandler takes a Window id - not a timer id, 1 just happens to be
the same value as a Window id.

new topic     » goto parent     » topic index » view message » categorize

14. Re: Win32Lib; Timed events

CChris wrote:
> 
> ZNorQ wrote:
> > 
> > CChris wrote:
> > > 
> > > ZNorQ wrote:
> > > > 
> > > > CChris wrote:
> > > > > 
> > > > > I said "any control will do". 0 is not an actual control id, not even
> > > > > a
> valid</font></i>
> > > > > 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</font></i>
> > > > 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
> 
> Other Windows developers had needed a window that would just take and dispatch
> messages, and nothing else (no switching to it, no taskbar button, no rectagle
> on screen, no nothing).
> 
> You can always do this by defining the event loop of the window
> accordingly.That's
> how it was done under Win9x. A good recipe for bugs. You can do that using
> win32lib's
> setDefaultProcessing().
> 
> So, in Win2K and onwards, there is a special sort of window with such a
> minimalistic
> functionality, which is called "message only window". win32lib cannot
> currently
> createEx() it, but the Windows API sure can (if curious, google for
> HWND_MESSAGE
> and check links to MSDN in the result).
> 
> 
> CChris

Ok, but my solution for now is creating a dummy window that the timer is
'linked' to, and just never use it in the WinMain() procedure. It seems to work
perfectly for me now.

Would there be any reason this is a bad idea, in this situation?

ZNorQ

new topic     » goto parent     » topic index » view message » categorize

15. Re: Win32Lib; Timed events

Bernie Ryan 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
> 
> You can use HWND GetDesktopWindow(VOID) to get a handle to desktop
> 
> window which is in most cases always available and use that with your timer.
> 
> Bernie
> 
> My files in archive:
> WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 
> 
> Can be downloaded here:
> <a
> href="http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan">http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan</a>

Ok, but I'm not really after the desktop handle, unless I can use that for
attaching my timer to it...? As you've problably read earlier in my posts, I
create a dummy window that I link my timer to, but I never use the window, by
starting with WinMain(0, Normal). Don't know if this is the best way to do it,
but it seems to work for me. :)

ZNorQ

new topic     » goto parent     » topic index » view message » categorize

16. Re: Win32Lib; Timed events

Shawn Pringle wrote:
> 
> ZNorQ wrote:
> > 
> > CChris wrote:
> > > 
> > > ZNorQ wrote:
> > > > 
> > > > 
> > > > I have a couple of questions in regards to timed events in Win32Lib;
> > > > 
> > > > a) Why wont this code example work? (PS! The mbox is just another form
> > > > of
> message_box,</font></i>
> > > > and it works - this isn't the problem.)
> > > > 
> > > > procedure evnTIM_Timer (integer hControl, integer hEvent, sequence
> > > > uParameters)
> > > >   mbox("5 seconds just passed...")
> > > > end procedure
> > > > setTimer(fmMAF, 12, 5000)
> > > > setHandler(12, w32HTimer, routine_id("evnTIM_Timer"))
> 
> > It works now, not because I used the showMessage (I did, but that didn't
> > change
> > anything), but because I changed from timer ID 12 to 1... So, I guess you
> > can't
> > have 12 timers? (I don't have 12 timers, 12 was just a random number I
> > picked
> > for my routine..)
> > 
> > Thank for the feedback, though.. :)
> > 
> > Kenneth/ZNorQ
> 
> It works now, not because you picked a lower number.  
> setHandler takes a Window id - not a timer id, 1 just happens to be
> the same value as a Window id.

Yeah, when I finally understood how it was used, I kinda figured that out
myself. Thanks for the heads-up anyway. :)

ZNorQ

new topic     » goto parent     » topic index » view message » categorize

17. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> CChris wrote:
> > 
> > ZNorQ wrote:
> > > 
> > > CChris wrote:
> > > > 
> > > > ZNorQ wrote:
> > > > > 
> > > > > CChris wrote:
> > > > > > 
> > > > > > I said "any control will do". 0 is not an actual control id, not
> > > > > > even a
> > valid</font></i>
> > > > > > handle for Windows. It is a special value which is treated, somewhat
> consistently,</font></i>
> > > > > > 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</font></i>
> > > > > 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
> > 
> > Other Windows developers had needed a window that would just take and
> > dispatch
> > messages, and nothing else (no switching to it, no taskbar button, no
> > rectagle
> > on screen, no nothing).
> > 
> > You can always do this by defining the event loop of the window
> > accordingly.That's
> > how it was done under Win9x. A good recipe for bugs. You can do that using
> > win32lib's
> > setDefaultProcessing().
> > 
> > So, in Win2K and onwards, there is a special sort of window with such a
> > minimalistic
> > functionality, which is called "message only window". win32lib cannot
> > currently
> > createEx() it, but the Windows API sure can (if curious, google for
> > HWND_MESSAGE
> > and check links to MSDN in the result).
> > 
> > 
> > CChris
> 
> Ok, but my solution for now is creating a dummy window that the timer is
> 'linked'
> to, and just never use it in the WinMain() procedure. It seems to work
> perfectly
> for me now.
> 
> Would there be any reason this is a bad idea, in this situation?
> 
> ZNorQ

It is not, as long as your application is concerned.

Now you may have an extra button on the taskbar, and a dummy window listed when
you press Alt-Tab. If they don't bother you, that's fine indeed.

CChris

new topic     » goto parent     » topic index » view message » categorize

18. Re: Win32Lib; Timed events

CChris wrote:
> 
> Now you may have an extra button on the taskbar, and a dummy window listed
> when
> you press Alt-Tab. 
> 
> CChris

Thats weird, because I don't. The only trace of the program is in the
taskmanager list; It doesn't show the form in either system tray nor the task
bar, which is fine since it's the way I want it..

ZNorQ

new topic     » goto parent     » topic index » view message » categorize

19. Re: Win32Lib; Timed events

ZNorQ wrote:
> 
> CChris wrote:
> > 
> > Now you may have an extra button on the taskbar, and a dummy window listed
> > when
> > you press Alt-Tab. 
> > 
> > CChris
> 
> Thats weird, because I don't. The only trace of the program is in the
> taskmanager
> list; It doesn't show the form in either system tray nor the task bar, which
> is fine since it's the way I want it..
> 
> ZNorQ

Good to know, thanks for input.

CChris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu