Hi,
Interesting problem
It would be quite involving depending on how close you want this to be to how max does it.
first I would train myself to master click and drag and get the start position, end position and compute then where the cube should be ( centered, with one corner at the start post and the other corner at the end pos).
Come back to me after the 12th of december, I will have more time to do a working sample of 3d max like cube creation.
bye,
Jean