They didn't "create a panel", they created a window, added controls, used the window DC to create an OpenGL window context and then used glViewport to draw to the rectangular portion of the window defined by that command.