Subj : Event Loop (Override Application->Run()?) To : borland.public.cpp.borlandcpp From : Takahiro Horie Date : Tue Oct 05 2004 01:59 pm Hello, Im writing a program that uses TWAIN, and according to their sample source code, I need to modify the windows event loop as follows: while (GetMessage((LPMSG)&msg,NULL,0,0)) { twEvent.pEvent = (TW_MEMREF)&msg; /* ... etc; do other TWAIN-related stuff ... */ if (NotATwainEvent) { /* process as normal */ TranslateMessage((LPMSG)&msg); DispathMessage((LPMSG)&msg); } } Unfortunately, all of this is hidden in Application->Run() when I create a VCL application. I searched the Borland site and found "Coding closer to the metal" http://bdn.borland.com/article/0,1410,27822,00.html ....But this means giving up all of the power of VCL and having to write in essentially raw Win32. Is there a way to do what I'm trying to do with TWAIN without throwing away the nice VCL TForms and whatnot? Thanks in advance, Timothy .