[WD17] Internal Windows **SOLVED**

Startbeitrag von David Egan am 27.02.2015 06:00

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?



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.



Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.