that's not totally right. uncomment the windows api does not mean you are getting rid of it. if you want to use both functions in your project, then you should worry about the redefination. If not, sparky99's way is the good one, because your project is coded under hl not windows.