c++ - winapi entry point without WinMain -
so going through source of winapi program found online noticed there no winmain anywhere, wonder if possible in anyway ever make winapi program work this, why think original programmer did this, have dialog procedure : static int_ptr callback maindialogproc(hwnd hwnd, uint msg, wparam wparam, lparam lparam) { switch(msg) { case wm_initdialog: { //.............. } } } and main entrypoint instead of void winapi winmain (void); void winapi entrypoint(void) { //........ } is possible? goes against have studied far... i'm sure i'm missing something... the entry point executable image specified through linker setting /entry . if not explicitly set, defaults maincrtstartup (or wmaincrtstartup ) console application, winmaincrtstartup (or wwinmaincrtstartup ) gui application, , _dllmaincrtstartup dll. when using crt ships part of visual studio, of aforementioned raw entry points call user-provided entry points main (or wmain ), winm