   Diverting winmain to class::function
  I''ve almost finished writing a basic wrapper for the winapi but I''ve run into a problem. The entry point. Right now I just write the winmain and pass control to the app class but I''d rather just be able to have winmain go to a public function of my app class straight away.Any suggestions? Does this even make sense? 
  You can''t wrap WinMain. It''s the application entry point. Nothing else exists (in simplified terms; this isn''t strictly true, but it''ll suffice for now) when it gets called. ;  That''s what I had thought, but I was also thinking that I could place a pointer or something at the entry point to my class member. That would require low level coding though wouldn''t it? If it''s at all possible!I''m now thinking I could just write a macro, to just write winmain and forward control to my member function.. would you recommend this? ;  i think most libraries simply provide a WinMain somewhere that is automatically used. that version then sets up the library and then transfers control to the user entry-point...MFC works something likes this, but im''m not 100% sure on the specifics. ;  Making a macro to do it is probably the easiest and least troublesome way. However, I don''t really like libraries that take too much power away from the user (eg wxWindows) because it ends up in errors due to not knowing how it works. I like how allegro does it (you put one macro at the end of main, you should download the source and see how they do it). ;  If you want to, you can just write a regularint main(void)and change the entry point to mainCRTStartup in your project settings, then just call your function.;  I''ve actually opted for using winmain, specifically for the reason of giving the user power. I want my wrapper to have a lightweight overhead. 