Tag: Windows

TimeLapse lib

Posted by on August 5, 2009

This little lib is used to keep track of time using the low resolution timer provided by the OS (in Windows “GetTickCount”). The goal of this type of library is to encapsulate timing actions. It was originally designed for game development in mind but needless to say you can use it and adapt it to your own needs.

Basically you define a time interval as you create the “timelapse” instance. Every time you call the update function a simple check determines whether the time was reached or not. This is trivial, but encapsulating it makes sense. Specially if you plan to create an animation system in the future!

Continue reading “TimeLapse lib” »

Centered MessageRequester() / MessageBox()

Posted by on July 2, 2009

As usual, I was browsing the PureBasic forums to see what was new, nothing much (heh…) but something caught my attention, the fact that some user requested for the IDE’s message dialogs to be “centered” ( because he had multiple displays and the messages would appear in between them ) just to get shit-faced by an actual staff member!

You can’t just say “it’s Microsoft’s fault” — Are you in some sort of mac-only cleanse?, What’s your #%&%#$ problem?!

Those who “pass the ball” (as the user suggested) are part of the problem. You, being a programmer can certainly code a simple CBT hook, right?. Are you against hooks, perhaps – you are a purist, I hear… Sorry, but sometimes solutions are “dirty” and you have to live with them.

Just for the record, I too use a split-screen and I find it annoying that dialog boxes are not centered to their parent.

Just for the record, I too use a split-screen and I find it annoying that dialog boxes are not centered to their parent.

Continue reading “Centered MessageRequester() / MessageBox()” »