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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:24:38+00:00 2026-05-15T16:24:38+00:00

I have a fullscreen application wrtten in C++ and would like to open a

  • 0

I have a fullscreen application wrtten in C++ and would like to open a dialog window so the user can select a file to be opened without the app breaking out of fullscreen mode.

On Windows, to run in fullscreen mode, I call ChangeDisplaySettings(&settings, CDS_FULLSCREEN). (Technically, I am using SDL, but this is the call it uses.)

To open the file dialog, I use the following code:

HWND hWnd = NULL;
SDL_SysWMinfo wmInfo;
SDL_VERSION(&wmInfo.version);
if( SDL_GetWMInfo(&wmInfo) ) {
    hWnd = wmInfo.window; // Note: This is sucessful, and hWnd != NULL
}

OPENFILENAMEW ofn;
wchar_t fileName[MAX_PATH] = L"";
ZeroMemory(&ofn, sizeof(ofn));

ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd;
ofn.lpstrFile = fileName;
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST;

if( GetOpenFileNameW( &ofn ) ) {
    DoSomethingWith( fileName );
}

When run, hWnd is not NULL, but when this dialog is created, it shifts the window focus to the dialog, which breaks out of the fullscreen app, similar to alt-tabbing to another window while in fullscreen. Once the file is selected and the Open File dialog closes, I have to manually switch back to the fullscreen app.

Is it possible to do what I want using existing Windows dialogs, or do I have to write my own in-app file browsing system or run in windowed mode only?

  • 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-15T16:24:39+00:00Added an answer on May 15, 2026 at 4:24 pm

    Sure… you just have to pass the HWND of the full screen window as the parent of the Open File common dialog (it is the hwndOwner parameter in the OPENFILENAME structure that is passed to GetOpenFileName).

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

Sidebar

Related Questions

I can't run an simple XNA window in fullscreen when I have hooked up
I have a non-fullscreen DirectX window displaying video, which I for application purposes need
I have 2 fullscreen window in my Gtk# application, primary and secondary. I have
I would like to make my WPF application fullscreen. Right now the start menu
I would like to create a full screen application (mac) but eventhough I have
I have a NSWindow that I'm putting into fullscreen mode. I would like to
I have this code that open from my C# application a doc file:. var
I have a WPF application that is a fullscreen kiosk app. It's actually a
I have tried to make the fullscreen feature of a SDI application with splitter
I have a Silverlight application running full screen. Is there a way i can

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.