Solved

Adding a New PushButton to CFileDialog

Posted on 1998-06-29
3
380 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
  • 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 50 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now