Solved

Adding a New PushButton to CFileDialog

Posted on 1998-06-29
3
414 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
java ^ examples 8 70
modThree challenge 4 105
x-bar in Google Sheets 2 93
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seveā€¦
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 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.

749 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