How to do something!

Can someone give me an example coding for something similar to a jack in abox, so that i could look at the coding so I can understand what is going on! Cos i am stuck!!!

Stuck om what? gewtting a window, using opengl, figuring out how do code the box/jack or…?