I created this program (code below) only to display a window, the very basics. I am using Visual Studio 2010(trial), using Visual C++. I created a class windowmain which inherits from CWnd. When I execute the program, the compiler does not report any error and the linker creates the executable file. But on execution, the assemble debugger reports access violation and the object which points to the CWnd object cannot identify the handle for the window to be created. Appreciate some help in this code.