Hi, Tom
[Demmer, Thomas] Hmm, what catastrophy does happen? I only have NT4 and 2K, I believe the problem is that the message handler tries to dispatch a message to a non-exisiting window.
The PC doesn't respond for a while, them you must stop the GRX app with Ctrl+Alt+Sup
Some suggestions:
- Setmode. Create the window_thread only if mp->extinfo->mode !=
GR_frametext, and destroy the window_thread (if created) else.
[Demmer, Thomas] Hmm. If we destroy window and thread, there is no more chance to keep the window's content. What is the correct behaviour here?
Perhaps the safer thing is to create the window in init and destroy it in reset, and use setmode to show and resize when a graphics mode is requested or hide the window instead (like now).
- Detect. The detect function can be called more than one time, so it is
necesary to have a static variable to signal it and return TRUE if the work was done. Move the InitialiceCriticalSection to "init" and add DeleteCriticalSection to "reset".
[Demmer, Thomas] Well, my stupidity. It should be moved *all* to init(). That one is called only once, am I correct?
Yes for normal apps, but I can imagine some special uses, so I think is safer to have the class registration in detect and be done only once using a static variable to signal it.
Reset. Destoy the window_thread if was created.
WM_CLOSE. We need to maintain the close dialog, people must be warned
they are avorting the program. If user says yes, move the message to the queue, and let abort the program in the input driver (the main thread) mouse/w32inp.c.
[Demmer, Thomas] OK.
Thanks for your work.
Greetings, Mariano.