I've developed something similar for a serial application mimiking a terminal application. I was a little tedious but I managed to get it to work like that by adding fake keystrokes using the function from the user interface library. In doing that I made sure that the cursor is where I waanted it to be when the user clicked on the window.
You can then swallow the up arrow key events in your app actively preventing the user from scrolling up. There is a thread in this forum discussing swallowing keystrokes.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd