[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Unable to draw over a Dialog

Posted on 2009-05-07
4
Medium Priority
?
503 Views
Last Modified: 2013-12-14
I am currently drawing an image using OpenGL into a CWnd. The Window is hidden and the image is drawn to the front buffer and then saved as a .bmp.

The problem is that there is another dialog on the screen at the same time and it is obstructing the hidden window I am drawing onto. This results in the saved bitmap having part of the obstructed dialog drawn on it. I have attempted to draw to the back buffer but all this does is leave the area that the dialog was obstructing being drawn in left black.

I have tried setting the tried using calls like SetFocus(), BringWindowToTop(), SetWindowPos(), etc with the idea of bring my window to the top of the pile but none of those ideas have worked. I suspect the reason is because the obstructing dialog is run independent from my Window, it's in C# my one is in C++.

I should also say that I have been able solve this problem on an 32 ibt XP machine but not on 64 bit XP. The same code also acts differently on Vista machines. I suspected it might have something to do with graphics cards as NVidea and ATi.
0
Comment
Question by:vedeveloper
[X]
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
  • 2
  • 2
4 Comments
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 24326668
This might be silly but a hidden window is not visible - so why do you draw onto it?
0
 

Author Comment

by:vedeveloper
ID: 24326854
The reason the window is hidden is because I don't want the window popping up for the user to see/. It is only created for the purpose of drawing the image and then saving it.
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 24327849
>>It is only created for the purpose of drawing the image and then saving it.

?
Why can't you save the image directly?

(I suspect your problems are because you are drawing to a non-visible window, nothing about C++  or C#)
0
 

Accepted Solution

by:
vedeveloper earned 0 total points
ID: 24430277
Sorted it myself. Just needed to get the window handle of the other dialog and place it to the Bottom of the Z-Order.
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
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.
Suggested Courses

650 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