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 373333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:17:52+00:00 2026-05-12T14:17:52+00:00

I am trying to save a file using GetSaveFileName and want to have a

  • 0

I am trying to save a file using GetSaveFileName and want to have a couple extra popups at the bottom of my save file dialog to allow the user to specify further options. I am trying to follow the MSDN documentation (specifically the Explorer-style customization) on the subject but can’t seem to get my custom item to appear. I believe I set up the OPENFILENAME struct properly as I’m getting calls into my OFNHookProc. As far as I know it is during the WM_INITDIALOG message that I should be creating my subcontrols, which is what I’m doing:

HWND settings_popup =
    ::CreateWindowExW(WS_EX_CLIENTEDGE | WS_EX_NOPARENTNOTIFY,
                      L"COMBOBOX",
                      L"Settings:",
                      WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL | WS_BORDER | CBS_DROPDOWNLIST,
                      10,
                      10,
                      150,
                      30,
                      dialog, // the window parameter from the OFNHookProc
                      NULL,
                      ::GetModuleHandle(NULL),
                      NULL);

if (settings_popup)
{
    HWND parent = ::GetParent(settings_popup); // for verification
    ::ShowWindow(settings_popup, SW_SHOW);
    ::EnableWindow(settings_popup, true);
}

I also return 1 from my OFNHookProc for the WM_INITDIALOG message and 0 for everything else.

In all my attempts to get the combobox to show in the dialog, it’s not coming up. What am I missing from my code to make the combobox a part of my save file dialog customization?

  • 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-12T14:17:53+00:00Added an answer on May 12, 2026 at 2:17 pm

    When calling CreateWindowEx() to create your child window, you need to use GetParent() to get the parent window of the dialog, and then use that HWND as your parent window. Do not use the dialog itself as the parent. In other words:

    HWND settings_popup =
        ::CreateWindowExW(WS_EX_CLIENTEDGE | WS_EX_NOPARENTNOTIFY,
                          L"COMBOBOX",
                          L"Settings:",
                          WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL | WS_BORDER | CBS_DROPDOWNLIST,
                          10,
                          10,
                          150,
                          30,
                          ::GetParent(dialog),
                          NULL,
                          ::GetModuleHandle(NULL),
                          NULL);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem while trying to save cookies to a file using FileCookieJar
I was trying to save one of the class object to a File using
I'm trying to save some data to A file in android, I'm using herefor
I'm trying to save a file in which I have some credentials. In order
i am trying to save a file from chrome using AjaxSubmit. i got the
I'm trying to save the contents of a textbox to a text file using
I am trying to save a file using DialogResult and StringBuilder . After making
I am trying to save (compress) a .zip file using JclCompression with the JCL
I am trying to save an Assembly to a file using System.Reflection.Emit.AssemblyBuilder but it's
I am trying to a save a website to an HTML file using Ruby.

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.