from example windows message handler by Ingo
windows message handler

test_message(command)
function test_message(command)
a=command

Contact us at files@mathworks.com