Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6157897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:51:52+00:00 2026-05-23T20:51:52+00:00

Yes, I know, one should not mix different platforms, but I am working on

  • 0

Yes, I know, one should not mix different platforms, but I am working on a Qt application and now we have a new requirement: a standard Windows Open File Dialog should be used in place of a QFileDialog.

So I would like to create a CFileDialog that is a child of a QWidget. I have found a question related to the inverse problem: QWidget as a child of an existing MFC component but nothing about my specific issue.

My plan is to write a wrapper class

class FileStdWDialog : CFileDialog

with a constructor

FileDirStdWDialog(QWidget *parent, ...);

and map this to a call to the superclass constructor

CFileDialog(..., ..., ..., ..., ..., CWnd* pParentWnd, ...)

So, if I understand correctly, my problem boils down to mapping
a QWidget * to a CWnd *. Do you know if there is an easy way to do this?

Update

Thanks for the hints. Probably, getting the HWND for a QWidget and
converting this to CWnd * is the right solution. I will try this way.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:51:53+00:00Added an answer on May 23, 2026 at 8:51 pm

    You could call ::GetOpenFileName and ::GetSaveFileName. Those are the Win32 functions that CFileDialog wraps, I think. So you wouldn’t need MFC.

    By the way, starting with Windows Vista, it is recommended to use the Common Item Dialog, rather than the standard Open and Save dialogs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any one know in which programming language were Google Talk application developed. yes
FIRST: Yes, I know about CONCATENATE and CONTINUEIF, but I might not be smart
(Yes I know I can call Java code from Scala; but that is pointless;
I´m trying to code a tooltip (Yes I know, I have my reasons to
First, yes I know about this question , but I'm looking for a bit
I have an AXIS2/JAX-WS web service using a code first implementation (yes I know,
I want to develop a web application, like an online scheduler. (Yes I know
I know the Sales pitch answer is yes to this question, but is it
I have thought of creating my first database application for one of my projects
I know a lot of question regarding VB6 migration have been asked, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.