Windows Dialog - Non MFC

Posted on 2006-05-09
Last Modified: 2013-11-25
How can I convert the following MFC code into native Winodws (non MFC)
I need to create a dialog that asks to save a file(like windows dialog) and lets you select file type etc....
            CFileDialog fd(FALSE, strLitCsv, strLitPPCsv,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT , szFilter);
                                    if(fd.DoModal() == IDOK)
Question by:pb_india
    LVL 12

    Accepted Solution

    LVL 11

    Assisted Solution

    Hi ,

    You need to use Common Dialog Box Library in windows.
    All you have to do is call GetOpenFileName function or GetSaveFileName function.

    You need to fill in the OPENFILENAME structure appropriately before you pass it inside the function.

    Best Regards,

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…

    729 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

    18 Experts available now in Live!

    Get 1:1 Help Now