Cooking in painted metal pots
This cup is not painted, but enameled, which means it is covered with a thin layer of molten glass (emaille).

As vitreous enamel is basically glass, it brings the same chemical and physical properties: chemically resistant, durable, scratch-resistant, smooth and long-lasting.

Enameled cookware is very safe, even at high temperatures (oven-proof), and easy to clean. The main weakness it the fact that the coating chips easily if the pot is dropped, but modern cookware is relatively resistant compared to older models. Some well-known manufacturers produce pots and pans with enamel, random examples are Le Creuset, Staub, Le Chasseur and others.

The kind of cup you have was quite common in farmers' households world wide a century or two ago and is still available in eastern European countries and the Balkans. It has fallen out of favour a bit in the West over the last decades but the recent "retro" trend has enameled goods (including tins, jugs and bowls) appear again, it seems. Note that campers, hikers and hunters always loved them for their versatility and sturdyness. 

So don't hesitate to use your enameled cup on the stove, it was made for that use.