First of all this verse shows the three kinds or ways the revelation of Allahs words reach a (human) Messenger or Prophet (not any person in general). Or how a Prophet or Messenger will receive Allahs words.
Note that the following verse starts with:
And thus We have revealed to you an inspiration of Our command. ... (42:52)
Which means the Qur'an!
All three kinds have examples in the qur'an and sunnah:
"O Allah's Messenger (ﷺ)! How is the Divine Inspiration revealed to you?" Allah's Messenger (ﷺ) replied, "Sometimes it is (revealed) like the ringing of a bell, this form of Inspiration is the hardest of all and then this state passes off after I have grasped what is inspired. Sometimes the Angel comes in the form of a man and talks to me and I grasp whatever he says." (sahih al-Bukhari)
Here the meaning of each kind:
- By revelation: the example you've posted is wrong, as the Qur'an himself is part of the revelation, here revelation may mean by a dream or inspiration. Revelation is explained by sending the meaning to the heart
- Behind a 'veil': as it happened to Musa ()
But when he came to it, he was called from the right side of the valley in a blessed spot - from the tree, "O Moses, indeed I am Allah , Lord of the worlds." (28:30)
- By a Prophet: Gabriel or any other angel (for example the angels that came to visit Ibrahim())
The Trustworthy Spirit has brought it down (193)
Upon your heart, [O Muhammad] - that you may be of the warners - (194)
In a clear Arabic language. (195) (26:193-195)
So the veil in surat a-Shura is the situation where Allah speaks to one of his Messengers directly, but for the simple reason that his Messenger would be blinded by the light (noor of Allah) he does so hidden behind something which might be considered a veil!
Therefore at-Tabari said: and HE will speak to him-the Messneger- (directly), and the Messneger would listen to HIM, but wouldn't be able to see HIM as happened to Musa().
... ‘Allah does not speak to anyone except from behind a screen, but He spoke to your father face to face and said: “O My slave, ask Me and I shall give you. ... (Sunan ibn Majah)
Here a quote from qtafsir:
This refers to how Allah sends revelation. Sometimes He casts something into the heart of the Prophet , and he has no doubt that it is from Allah, as it was reported in Sahih Ibn Hibban that the Messenger of Allah said:
(Ar-Ruh Al-Qudus ﴿i.e., Jibril﴾ breathed into my heart that no soul will die until its allotted provision and time have expired, so have Taqwa of Allah and keep seeking in a good (and lawful) way.)
(or from behind a veil) -- as He spoke to Musa, peace be upon him. He asked to see Him after He had spoken to him, but this was not granted to him. In the Sahih, it recorded that the Messenger of Allah said to Jabir bin `Abdullah, may Allah be pleased with him:
(Allah never speaks to anyone except from behind a veil, but He spoke to your father directly.) This is how it was stated in the Hadith. He ﴿Jabir's father﴾ was killed on the day of Uhud, but this refers to the realm of Al-Barzakh, whereas the Ayah speaks of this earthly realm.
(or (that) He sends a Messenger to reveal what He wills by His leave.) as Jibril, peace be upon him, and other angels came down to the Prophets, peace be upon them.