-2

Is there a simple way to see openGL images only in small part of window? I need some controls like buttons or checkboxes on the rest part. How it is possible? Is it possible with (free)GLUT?

===Edit1===

In other words, I need a children window, which will be the quarter of my existing window. Then I have to change the next code in order to pack the glut entity in this small window.

glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
glutInitWindowPosition(20, 20);
glutInitWindowSize(frame_width, frame_height);
glutCreateWindow("MyVideo2");
ged
  • 687
  • 7
  • 19
  • 1
    Create a child window and put your GLUT stuff there. – andlabs Jul 28 '16 at 12:41
  • @andlabs , yes, you understand what I want, but I am asking about how to create such child window that has no borders, maximize/mininmize buttons, title, etc. – ged Jul 28 '16 at 12:45
  • 1
    [CreateWindowEx](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632680.aspx), like you create any other window, too. If you need an introduction, make sure to read [windows](https://msdn.microsoft.com/en-us/library/windows/desktop/ms632595.aspx) as well. – IInspectable Jul 28 '16 at 12:51
  • @IInspectable Thanks for the link. You don't know how to attach one window to another, do you? Is it possible? I think yes, because old versions of 3DMax and AutoCad had viewports with 3d graphics... – ged Jul 28 '16 at 14:11
  • That's what a child window is. I suggest reading a tutorial on Windows programming (I imagine you are opening a window directly with GLUT right now?). – andlabs Jul 28 '16 at 14:36
  • @andlabs, Yes, you are right! So I've edited the question to make it more precise. – ged Jul 28 '16 at 14:56

1 Answers1

0

This article explains the way of creation such program minutely in detail, it works for me with few ommited moments like that I couldn't set calling OnTimer on the picture control in VS13 so I have to set it on the dialog.

http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c10975/Setting-Up-OpenGL-in-an-MFC-Control.htm

ged
  • 687
  • 7
  • 19