Article ID: 192536
Article Last Modified on 11/18/2003
// Sample.cpp -
//
// Should show the constructor message before the main program
// message. Instead, the constructor message isn't shown at all.
//
#include <windows.h>
#define MSG(z) MessageBox(0,z,TEXT("Sample"),MB_OK)
struct MYCLASS
{
MYCLASS() { MSG(TEXT("Constructor called.")); }
};
MYCLASS myclass;
int WINAPI WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
MSG(TEXT("Main program."));
return 0;
}
Keywords: kbbug kbpending KB192536