Skip to main content
GameDev.net gamedev.net
🔒 Locked

CFileDialog ?

Started by Tree Penguin Jan 8, 2004 at 8:02 AM 2 replies 550+ views
Original Post
Tree Penguin
Tree Penguin
This is a little off-topic but ok, I am trying to use a CFileDialog using this code: CFileDialog d(true); This should create a standard open file dialog. However, I get this error: Does anyone know how to fix it ? Thanks in advance, TP EDIT: image link Ow, and in release mode it just won't load. [edited by - Tree Penguin on January 8, 2004 9:08:25 AM]
SiCrane
SiCrane
What compiler is this on? Depending on which version of MSVC you''re using this could either be a failure to intialize the instance handle for MFC or a failure to initalize the resource handle for MFC. I''m guessing the latter. If so, then try to call AfxSetResourceHandle() in the InitInstance() function in your CWinApp class.
Tree Penguin
Tree Penguin
I am using MSVC++ 6.0,
I am using the standard NeHe basecode with menus, so no CWinApp class is used.

[edited by - Tree Penguin on January 8, 2004 9:35:26 AM]
Tree Penguin
Tree Penguin
Thanks i got it fixed !

I placed a call to AfxSetResourceHandle(hInstance) before the ShowWindow(hWnd,SW_SHOW) call!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.