PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD17] Internal Windows **SOLVED**
[WD17] Internal Windows **SOLVED**
Iniciado por guest, 27,feb. 2015 07:00 - No hay respuesta
Publicado el 27,febrero 2015 - 07:00
Hi
I have 2 internal windows, essentially consisting of table controls. When I created the internal window control I specified IW1 as the default window, and I use ChangeSourceWindow to IW2 depending on a selection in a combo box.

My problem is that IW1 works perfectly but, whilst the window changes correctly to IW2 as soon as I click anywhere on that window I get a Visual C++ Runtime error "Application requested the runtime to terminate in an unusual way" & the whole thing crashes. The odd thing though is that if I tab into the window it works perfectly. If I change the default window to IW2 that works OK but then ChangeSourceCode to IW1 gives me the same error. I have several procedures in the windows & I have made sure the names & parameters are identical in each one. One window declares a structure which I duplicated in the other, just in case that was the problem but no luck.

I've tried deleting CPL etc but still no good. Any ideas?

Thanks

David

Found it - I just needed to check which internal window was current before attempting to change it. The code for ChangeSourceWindow was being called a second time when it was getting the focus by mouse click. If it was already the current window it would crash.

David