[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • Last Modified:

openGL in dialog - child window focus

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
shetlandbob
Asked:
shetlandbob
  • 2
1 Solution
 
nabehsCommented:
Did u try BringWindowToTop(hwnd) API function?
0
 
shetlandbobAuthor Commented:
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
 
shetlandbobAuthor Commented:
i found a solution on line at

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

for any one interested
0
 
Computer101Commented:
PAQed, with points refunded (125)

Computer101
E-E Admin
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now