GoG.com DOSBox games start the DOSBox executable with some configs as parameters. You will have to do the same when adding the shortcuts to Steam.
First of all, pick your game. I will pick Ultima Underworld 1 because I have it installed. Right click on the desktop shortcut generated by the installer (if you don't have it on your desktop anymore, check the game's installation folder, there is one there; mine is called "Launch Ultima Underworld 1"), and see its properties:
The shortcut's target is what matters to us. Copy everything in there, and keep it for later. In my case, the full field looked like this:
"F:\GOG Games\Ultima Underworld 1 and 2\DOSBOX\DOSBox.exe" -conf "..\Ultima Underworld 1\dosboxULTIMA1.conf" -conf "..\Ultima Underworld 1\dosboxULTIMA1_single.conf" -noconsole -c exit
Go to Steam, click on Games
in the top menu, then on Add a non-steam game to my library
. Once the game list window appears, click on browse. Find the DOSBox executable that's being used by your game. In my case this was at F:\GOG Games\Ultima Underworld 1 and 2\DOSBOX\DOSBox.exe
. Add that as a game.
Once done, find the game you added in your games list. Right click on it, then click on Properties
. You will see a Target
field in the newly opened window, with the path to your DOSBox.exe and nothing else. Replace everything in that field with the original shortcut's target that you copied before.
After this your game should run normally when launched by Steam.
Checking on Steam, you cannot currently (as of 19/05/15) retrieve a CD key for the game. I cannot speak for Origin purchases, but it seems likely to be the same if utilizing the Origin infrastructure / client.
This might change in the future, but based on the previous systems (basically, entering CD keys into GoG here), it seems that it's not possible. Additionally, the interface linked above doesn't mentioned The Witcher 3.
Best Answer
If you want automatic updates you have to create an account on GOG.com either from Galaxy client you use to launch the game or via GOG.com website. After creating an account you will also have to redeem the code you got on retail box of your Witcher 3 copy.
Other method is just to download patches from http://thewitcher.com/ website.