Solved

SubClassing CFileDialog

Posted on 1997-03-20
2
388 Views
Last Modified: 2013-11-20
In my application, I need to customize CFileDialog based on FILEOPENORD dialog template, which is an old style dialog ( Windows NT 3.51 ). I also need to modify the dialog template to add a few controls to it. The code is working fine in a test application. But it's failing when I use this CMyFileDialog class in an extended DLL and invoking it from main application. There are no failure messages of Windows or MFC ( e.g. ASSERTions ). When I call DoModal(), no dialog is getting displayed.
Please let me know if you have any idea about this problem.
Thanks,
Rajesh
0
Comment
Question by:rajesh032097
2 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1300188
You'll have to roll up your sleeves and do some debugging: it's  as simple as that. Trace into DoModal() and figure out why it's failing.

Odds are that it's failing because MFC can't find the dialog resource template that you've defined.  Depending on how you're calling your DLL, you might ened to use an AFX_MANAGE_STATE() macro to make sure MFC knows what the module handle is supposed to be so it can properly load the template.

.B ekiM


0
 

Expert Comment

by:test031097
ID: 1300189
What a stupid answer from Mikeblas
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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.

803 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