Solved

openGL in dialog - child window focus

Posted on 2004-08-27
5
451 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
[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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
EvenOdd challenge 10 147
MaxSpan challenge 9 124
mapBully challenge 6 178
wordmultiple challenge 12 157
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

726 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