Solved

openGL in dialog - child window focus

Posted on 2004-08-27
5
449 Views
Last Modified: 2013-11-20
Hi,

I have a MFC Dialog control with an OpenGL window embedded into it and other controls associated also.

One of my controls loads up a child dialog control, however the focus of the child is "lost" and it falls behind the main application (one way to get focus is to press "ALT" but this is obviously not ideal!!!).

I've tried a few things but they dont seem to work (such as setfocus, setforegroundwindow etc..) although I'm open to any suggestions!!!

On a side note, if the child dialog is modeless then this problem is not evident!!

Anyone experienced this? Or any ideas on how to fix it?

As always much appreciated.

Cheers
0
Comment
Question by:shetlandbob
  • 2
5 Comments
 
LVL 6

Expert Comment

by:nabehs
ID: 11910608
Did u try BringWindowToTop(hwnd) API function?
0
 

Author Comment

by:shetlandbob
ID: 11910683
Thanks for the reply

yes I've tried that and it returns a TRUE as if the function is successful, but the window remains behind the main application.
0
 

Author Comment

by:shetlandbob
ID: 12014610
i found a solution on line at

http://steinsoft.net/index.php?site=Programming/Tutorials/opengl_dialog

for any one interested
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12233609
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
Looking for a specific application/software 2 109
sum67 challenge 35 97
haveThree challenge 22 118
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

776 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