Solved

openGL in dialog - child window focus

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now