ActiveFrost
June 8th, 2009, 12:03 PM
Ok, so .. I'm a bit confused - why this code shows console + GUI, not only GUI ( tried to compile on CodeBlocks & Dev-C++ ) ?
Screenshot : http://i39.tinypic.com/auweag.png
#include <windows.h> // include the Windows API
// Application object which says hello and goodbye
class Application
{
public:
Application() // say hello when object is constructed
{
Say("Hello World!");
};
~Application() // say goodbye when object is destroyed
{
Say("Goodbye World!");
};
void Say(char* Message)
{
// Use the Win32 function MessageBox to
// display the message with
// an OK button and an information icon
MessageBox(NULL,Message,"Application Message", MB_OK |
MB_ICONINFORMATION);
};
};
// Create out global application object
Application theApp;
// WinMain function is the entry point for Win32 programs
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
return 0;
}
Screenshot : http://i39.tinypic.com/auweag.png
#include <windows.h> // include the Windows API
// Application object which says hello and goodbye
class Application
{
public:
Application() // say hello when object is constructed
{
Say("Hello World!");
};
~Application() // say goodbye when object is destroyed
{
Say("Goodbye World!");
};
void Say(char* Message)
{
// Use the Win32 function MessageBox to
// display the message with
// an OK button and an information icon
MessageBox(NULL,Message,"Application Message", MB_OK |
MB_ICONINFORMATION);
};
};
// Create out global application object
Application theApp;
// WinMain function is the entry point for Win32 programs
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
return 0;
}