Page 1 of 1

add timer to DLL

Posted: Sun Apr 07, 2013 5:04 pm
by Heinz123
Hello,

I need to add a timer to a DLL.
This DLL will be used as a plugin for Notepad++.

It seems that the PB timer must be bound to a window...but my DLL has no window.
So what would be the best approach?
-add a window (plus timer) and hide the window
-other options ...?

thanks
Heinz

Re: add timer to DLL

Posted: Sun Apr 07, 2013 5:10 pm
by Josh
Use Api:

SetTimer_

Re: add timer to DLL

Posted: Sun Apr 07, 2013 6:26 pm
by Heinz123
OK... the description here http://msdn.microsoft.com/de-de/library ... s.85).aspx says that hwnd parameter is optional...so will try it...
thank you

Re: add timer to DLL

Posted: Sun Apr 07, 2013 9:05 pm
by tj1010
or you could just use createthread, elapsedmilliseconds, and delay....

Re: add timer to DLL

Posted: Mon Apr 08, 2013 11:07 am
by Bisonte
or you create an invisible window...

Re: add timer to DLL

Posted: Mon Apr 08, 2013 3:29 pm
by Brandon Parker
Doesn't Notepad++ expose something like 4 of its windows' handles?

Why not bind the timer to one of those handles?

{:0)

Brandon

Re: add timer to DLL

Posted: Mon Apr 08, 2013 5:11 pm
by Heinz123
yes, right... Notepad++ / Scintilla have window handles...so maybe I can use them.
Thank you for the hint

Heinz