PDA

View Full Version : wglMakeCurrent and GetOpenFileName



LeighM
06-17-2002, 12:49 AM
Hello,

I have created a Win32 application (No MFC) and have a main window with four child windows inside. Any time I try to use GetOpenFileName after I have used wglMakeCurrent the dialog won't appear and the app just hangs. I tried using GetOpenFileName when the scene is displayed in the main window with no child windows and this works fine.

Any ideas?

dorbie
06-17-2002, 01:35 AM
Hmm, you're calling this in a ondraw callback then?

Shouldn't you pass an event that get's picked up in your handler and creates the dialog?

LeighM
06-17-2002, 02:01 AM
Sorry, I don't think I was very clear in my first post. I am calling GetOpenFileName in response to a menu selection in my main handler. Wglmakecurrent is called during my initialisation of the windows not at the same time as GetOpenFileName.