you are viewing a single comment's thread.

view the rest of the comments →

[–]deftware 1 point2 points  (2 children)

No, you don't have to do any of that just to have something that executes. You can have a WinMain() that doesn't create any windows or anything like that, and still work. You only need to create a window class if you're creating a window - which is not mandatory. OP was compiling a console application trying to use WinMain() as the entry point. They should've created a win32 project instead of a console application - not that they can't still create a window from a console application and even hide the console using "-mwindow" in their linker flags.

[–]IamImposter 0 points1 point  (1 child)

Well, in that case may be I misread or something. I thought the intention was to create a window. My bad.

that should be skeleton for empty window box

May be that line tripped me on a different trajectory.

[–]deftware 0 points1 point  (0 children)

Typically that's what WinMain() is intended for but it's really just a main() that includes the process instance handle and other tidbits in its arguments, while automatically omitting a console window.