of receiving information from the operating system as such.
This is MASM for the pre-WinMain code,
Code:
start: invoke GetModuleHandle, NULL mov hInstance, eax invoke GetCommandLine mov CommandLine, eax invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT invoke ExitProcess,eax
it sends to it, the action is in the style SW_SHOWDEFAULT.
Code built in this manner honours the operating system choice of
starting minimised, normal or maximised.
A PBmain() is a lower level method that a WinMain and you can do
the same things in it, get the instance handle (start address in
memory), a command line if you need it and you can set the
ShowWindow() to the style you need directly in the code.
It is a good alternative as a WinMain is a 16 bit windows leftover
that has a dead previous instance parameter.
To answer you original question, there is not a lot of reason to
use a WinMain these days, you can get all of the information without
it.
Regards,
[email protected]
[This message has been edited by Steve Hutchesson (edited February 17, 2001).]
Leave a comment: