A window class is something you register with RegisterClass().
what i dont get is "the same window class"...can you clarify that for me?...what is the window class name...like the same classification...(not C++ classes)....please explain
Once you have registered this class you can instanciate is as many times as you want.
now this window class is registered with the name "myWindowClass" and you can create as many instances as you want by calling
wnd.lpszClassName = "myWindowClass";
wnd.cbSize = sizeof(WNDCLASSEX);
/* etc etc..initialize the fields of the WNDLCASSEX structure here.
RegisterClassEx(&wnd); // here you register you class so you can use it in you app
so, basically, what you wrote first was correct, only don't
myWindow = CreateWindowEx(0, "myWindowClass",...... );
forget to register the class ( or you can use a predefined-class).