?
Solved

Adding a New PushButton to CFileDialog

Posted on 1998-06-29
3
Medium Priority
?
425 Views
Last Modified: 2013-11-20
Can Some one post me a method to add a PushButton like example07b of david .j. kruglinski in vc++ 5.0
I did use GetParent method to get handle of IDOK but my new button which i created did not show in cfiledialog (dwStyle has WS_VISIBLE flag)
0
Comment
Question by:shriya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1318492
To add a control to standard dialog you must define your own dialog template. open comctl32.dlg as resources, find common dialog you want to use, copy it to your resources. Open dialog resource in resource editor, add control to the template.Add OFN_ENABLETEMPLATE flag to Flags field of m_ofn structure and specify template name in lpTemplateName field of this structure.
0
 
LVL 1

Author Comment

by:shriya
ID: 1318493
Actually I wnted to add a push-Button at runtime without using Resource editor.
This was done by David Kruglinski in version 1.5
I tried the same but couldn't achieve it.
it need not be cFiledialog even
aboutDialog box would do(only I should do it without using resource editor.
0
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1318494
If you want to add button at run time use file dialog hook procedure. It is lpfnHook member of m_ofn structure. OFN_ENABLEHOOK flag must be set. You must also implement hook procedure that will receive all messages and windows handle of the window that is sent a message. You can catch WM_CREATE window for dialog window and create your button
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

765 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