Quote Originally Posted by noeska
I want something to work independed of vcl.
[...]
Or am i better of integrating this into an (opengl) api template as that already includes handling windows messages.
This code of mine can be easily used with OpenGL WinAPI template. Just like you did, but I think, just like JSoftware, that it should be inside your window procedure, because this is where the messages come to.