S
Steve Richter
I am working from the C++ .net step by step book ...
my project compiles and runs as a console application:
#include "stdafx.h"
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
int wmain(void)
{
Console::WriteLine(S"Forms Example");
Application::Run(new CppForm());
return 0;
}
Now I would like to get rid of the console part of the appl, so I
replace
int wmain( void )
with:
int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow )
and the compiler does not know what HINSTANCE is.
so I add an include stmt:
#include <windef.h>
and all hell breaks loose. undefined this, what is that, ...
1st question: is it "wmain" that makes a console application? and
WinMain makes a window application?
2nd question: what include files are needed to use "WinMain" as the
program entry point?
3rd question: is there a good MS document that explains all the
different include files in C++ .NET and when to use them?
thanks,
Steve Richter
my project compiles and runs as a console application:
#include "stdafx.h"
#using <mscorlib.dll>
#using <System.dll>
#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
int wmain(void)
{
Console::WriteLine(S"Forms Example");
Application::Run(new CppForm());
return 0;
}
Now I would like to get rid of the console part of the appl, so I
replace
int wmain( void )
with:
int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow )
and the compiler does not know what HINSTANCE is.
so I add an include stmt:
#include <windef.h>
and all hell breaks loose. undefined this, what is that, ...
1st question: is it "wmain" that makes a console application? and
WinMain makes a window application?
2nd question: what include files are needed to use "WinMain" as the
program entry point?
3rd question: is there a good MS document that explains all the
different include files in C++ .NET and when to use them?
thanks,
Steve Richter