hm..right...
i used strcpy() instead, is that ok?
and i found that i keep a WNDCLASSEX in Window class so i used it instead of GetClassName
so, now i dont get acceess violation error and all functions works fine [smile], exept one :(
i wrote printf("%d\n",GetLastError()); in the WndProc (SWndProc), and in Window::close() i wrote printf(wc.lpszClassName);printf("\n");
when i call win.create(or createFS)() only, in console i see a lot of 0s and the class name ("Tribox Engine Demo"). (then it quits the program, as it suppose to do)
when i add win.toggle(), i get same chars but now i get it twice (because i first created a window, then closed it and now created again.) (then, quits. of course, no main loop.)
however, when i add win.run(), in the middle of the second window i get "Out of loop!" message and program ends up. (this message is called after:
while(GetMessage(&msg, NULL, 0, 0) > 0)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
})
However, when i just call win.create(or createFS)() and win.run(), everything run fine.
win.toggle now is just:
int Window::toggle(){ if (!togglerogl()) // called to re-initialize opengl automatically return 0; // if opengl was called fullscreen=!fullscreen; if (fullscreen) return createFS(title); else return create(title);}
the only non-0 i have seen is when i call just create() and run()--and the number is 183 (i think) which means cannot create the file because its already exists, or something like that. so i guess its not something serious, right? i get it only once (per application with just create() and run()).
thanks in advance,
pex.
[Edited by - pex22 on December 15, 2004 4:43:20 AM]