[Coco] Re: M.E.S.S. video window acquired

Roger Taylor rtaylor at bayou.com
Thu Nov 6 13:18:00 EST 2003


At 08:21 AM 11/6/2003 -0500, you wrote:
>Roger Taylor writes:
>>I have successfully acquired control of the running M.E.S.S. program's 
>>video window.  This means I can resize it, position it anywhere, alter 
>>it's z-order, make it stay on top, to name a few evil tricks.  I plan to 
>>make it appear to be part of the IDE's own main window at times. This 
>>means you'll be able to write CoCo software on part of the screen and 
>>watch it appear running in the video port somewhere else on the screen.
>>Can somebody say, "Are we having fun yet?"   :)
>
>Hmmm this sounds intriguing.  Do you have any screenshots?
>If you're able to do this without any actions on MESS's part, I wonder 
>what we could do if we collaborated?

M.E.S.S. doesn't have a clue.  You simply aquire (find) the M.E.S.S. 
application's main window handle, then pass system messages to 
it.  M.E.S.S. just obeys the messages, like any other application 
would.  For instance, a SetWindowPos message does the trick, but a 
subsequent WM_SIZE message has to be sent.  I found out that M.E.S.S. 
corrects the aspect ratio of the window when it processes that message.  So 
you could size the window wrong, and it will adjust the aspect.  I know a 
lot about the Windows API, so I know there is plenty I can do.  FOR 
EXAMPLE: I could subclass the M.E.S.S. window without it ever knowing, and 
take control in a lot of ways.  I could also send keystrokes right into the 
CoCo's world, making them show up on the DECB screen, for example.  To the 
"CoCo", and M.E.S.S., well, they have no clue it's not a user.



>It's also worth noting that MESS has a builtin full featured debugger that 
>is only enabled when compiled in debug mode.  I've always toyed with the 
>idea of enabling the debugger in release builds, but have always leaned 
>against it because the debugger was made by the MAME people for their own 
>use while developing MAME, and while being very functional, it is also a 
>bit ugly.  Perhaps these hooks could be exploited to create debugger 
>integration for your IDE?

Debugger for the CoCo, or the M.E.S.S. program?

I'm actually controlling the video window frame that houses the M.E.S.S. 
video surface, not the M.E.S.S. application itself, nor the actual 
surface.  This window looks like any other Windows app frame with the close 
box, etc.  If I can move it control it, it doesn't mean it loses it's own 
control.  Some of it's own control is making sure the video surface acts as 
a child of the main window, causing it to move with the frame window.

I was visiting a Vectrex site and saw someone asking if there was a 
Vectrex-frienfly front-end for the M.E.S.S. window.  We could have a 
CoCo-frienfly front-end, as well.  Actually, right now, my IDE is probably 
the closest thing yet.

There is no screenshot yet of the M.E.S.S. window being overlayed into my 
IDE, because my M.E.S.S. video uses the DirectX surface, while the IDE uses 
standard screen memory.  I have no tools to capture both at the same 
time.  However, if I could tell M.E.S.S. to not use DirectX, then I could 
do a snapshot of the screen to show you.  I'll try it.






More information about the Coco mailing list