How get a DC of *part* of the client area (OpenGL question)

Posted on 2003-03-30
Medium Priority
Last Modified: 2013-11-20
Is this possible?  I would like to be able to declare only part of a dialog as an OpenGL rendering context, for example if I have an 800x400 window, I'd like to put controls in the left 200x400 and make the right 600x400 the rendering context.

Thanks in advance.
Question by:DalTXColtsFan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8236142
You can create a child window covers the right 600*400 area, and get the rendering context of the child window.

Author Comment

ID: 8236351
Thanks but not quite the answer I was looking for - in addition to creating a child window, I can also draw a frame and assign a CStatic member variable to it, then use the CStatic's GetDC() method to do the same thing.

So more what I was looking for is a way to get a DC for part of a window.

Any ideas?

Expert Comment

ID: 8236632
You should be able to use GetDCEx and pass a clipping region that limits you to the area you wish to draw in.
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

LVL 12

Expert Comment

ID: 8241355

  I'm not familiar with OpenGL but for DirectX you set up a clipper for the region you want to work with. I'm sure Opengl has something similiar.

Expert Comment

ID: 8344914
Dear expert(s),

A request has been made to close this Q in CS:

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.


Community Support Moderator
Experts Exchange
LVL 12

Expert Comment

ID: 8345017


Accepted Solution

modulo earned 0 total points
ID: 8360431
Saving this Q as a PAQ and refunding the points to the questionner


Community Support Moderator
Experts Exchange

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question