add timer to DLL

Just starting out? Need help? Post your questions and find answers here.
Heinz123
User
User
Posts: 14
Joined: Sat Feb 25, 2012 8:54 am
Location: Germany

add timer to DLL

Post 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
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: add timer to DLL

Post by Josh »

Use Api:

SetTimer_
sorry for my bad english
Heinz123
User
User
Posts: 14
Joined: Sat Feb 25, 2012 8:54 am
Location: Germany

Re: add timer to DLL

Post 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
tj1010
Enthusiast
Enthusiast
Posts: 716
Joined: Mon Feb 25, 2013 5:51 pm

Re: add timer to DLL

Post by tj1010 »

or you could just use createthread, elapsedmilliseconds, and delay....
User avatar
Bisonte
Addict
Addict
Posts: 1324
Joined: Tue Oct 09, 2007 2:15 am

Re: add timer to DLL

Post by Bisonte »

or you create an invisible window...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
User avatar
Brandon Parker
User
User
Posts: 19
Joined: Fri Mar 30, 2012 2:30 am
Location: Scottsville, Virginia

Re: add timer to DLL

Post 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
Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Heinz123
User
User
Posts: 14
Joined: Sat Feb 25, 2012 8:54 am
Location: Germany

Re: add timer to DLL

Post by Heinz123 »

yes, right... Notepad++ / Scintilla have window handles...so maybe I can use them.
Thank you for the hint

Heinz
Post Reply